2018_06_03_095342_create_cruds_table.php 867 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. // create_cruds_table
  3. use Illuminate\Support\Facades\Schema;
  4. use Illuminate\Database\Schema\Blueprint;
  5. use Illuminate\Database\Migrations\Migration;
  6. class CreateCrudsTable extends Migration
  7. {
  8. /**
  9. * Run the migrations.
  10. *
  11. * @return void
  12. */
  13. public function up()
  14. {
  15. Schema::create('cruds', function (Blueprint $table) {
  16. $table->increments('id'); //индекс
  17. $table->string('title'); //название
  18. $table->string('post'); //описание
  19. $table->date('date'); //дата провидения
  20. $table->string('type'); //тип мероприятия
  21. $table->timestamps();
  22. });
  23. }
  24. /**
  25. * Reverse the migrations.
  26. *
  27. * @return void
  28. */
  29. public function down()
  30. {
  31. Schema::dropIfExists('cruds');
  32. }
  33. }