2016_03_12_215913_create_words_table.php 867 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. class CreateWordsTable extends Migration
  5. {
  6. /**
  7. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up()
  12. {
  13. Schema::create('words', function(Blueprint $table) {
  14. $table->increments('id');
  15. $table->timestamps();
  16. $table->string('value');
  17. $table->integer('sentence_id')->unsigned()->nullable();
  18. $table->foreign('sentence_id')->references('id')->on('sentences');
  19. //$table->integer('postag_id')->unsigned()->nullable();
  20. //$table->foreign('postag_id')->references('id')->on('postags');
  21. });
  22. }
  23. /**
  24. * Reverse the migrations.
  25. *
  26. * @return void
  27. */
  28. public function down()
  29. {
  30. Schema::drop('words');
  31. }
  32. }