2020_07_06_145857_create_signs_table.php 877 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateSignsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('signs', function (Blueprint $table) {
  15. $table->id();
  16. $table->string('signable_type')->index()->comment('签名类型(表名)');
  17. $table->string('signable_id')->index()->comment('ID');
  18. $table->string('field')->nullable()->comment('字段名');
  19. $table->string('mark')->nullable()->comment('标记');
  20. $table->timestamp('created_at');
  21. });
  22. }
  23. /**
  24. * Reverse the migrations.
  25. *
  26. * @return void
  27. */
  28. public function down()
  29. {
  30. Schema::dropIfExists('signs');
  31. }
  32. }