2018_07_31_032946_create_codes_table.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateCodesTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('codes', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->integer('type_id')->comment('类型ID');
  17. $table->string('code_name',255)->comment('CODE名称');
  18. $table->integer('code_id')->comment('CODE ID');
  19. $table->string('code_value',255)->comment('CODE值');
  20. $table->integer('code_seq')->comment('顺序');
  21. $table->string('code_dsp_name_cn',255)->comment('显示名称');
  22. $table->string('code_dsp_name_y',255)->comment('别名')->nullable();
  23. $table->timestamps();
  24. });
  25. }
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. Schema::dropIfExists('codes');
  34. }
  35. }