Browse Source

:construction: migrate ProgressChapter

visuddhinanda 4 years ago
parent
commit
200cf48b35

+ 11 - 0
app/Models/ProgressChapter.php

@@ -0,0 +1,11 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Factories\HasFactory;
+use Illuminate\Database\Eloquent\Model;
+
+class ProgressChapter extends Model
+{
+    use HasFactory;
+}

+ 37 - 0
database/migrations/2021_12_29_051305_create_progress_chapters_table.php

@@ -0,0 +1,37 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateProgressChaptersTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('progress_chapters', function (Blueprint $table) {
+            $table->id();
+            $table->integer('book');
+            $table->integer('para');
+            $table->string('lang',16);
+            $table->float('all_trans');
+            $table->float('public');
+            $table->timestamp('created_at')->useCurrent();
+			
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('progress_chapters');
+    }
+}