en_btr_backend/database/migrations/2020_10_01_231338_create_wo...

43 lines
1.0 KiB
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateWordsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('words', function (Blueprint $table) {
$table->string('id')->primary();
$table->string('ulb');
$table->string('greek');
$table->string('lemma');
$table->string('morph');
$table->bigInteger('ognt_sort');
$table->string('strongs_number');
$table->string('verse_id')->nullable();
$table->timestamps();
});
Schema::table('words', function (Blueprint $table) {
$table->foreign('verse_id')->references('id')->on('verses');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('words');
}
}