Ver Fonte

:construction: migrate PaliSentOrg

visuddhinanda há 4 anos atrás
pai
commit
f13a00c2a1

+ 11 - 0
app/Models/PaliSentOrg.php

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

+ 45 - 0
database/migrations/2021_12_29_025006_create_pali_sent_orgs_table.php

@@ -0,0 +1,45 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreatePaliSentOrgsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('pali_sent_orgs', function (Blueprint $table) {
+            $table->id();
+            $table->integer('book');
+            $table->integer('paragraph');
+            $table->integer('word_begin');
+            $table->integer('word_end');
+            $table->integer('length');
+            $table->integer('count');
+            $table->text('text');
+            $table->text('html');
+            $table->integer('merge')->default(1);
+            $table->text('sim_sents')->nullable();
+            $table->text('sim_sents_count')->default(0);
+			$table->timestamp('created_at')->useCurrent();
+			$table->timestamp('updated_at')->useCurrent()->useCurrentOnUpdate();
+			$table->index(['book','paragraph','word_begin','word_end']);
+
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('pali_sent_orgs');
+    }
+}