Total Complexity | 2 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class CreateTriadevElasticsearchMigrationStepTable extends Migration |
||
8 | { |
||
9 | /** |
||
10 | * Run the migrations. |
||
11 | * |
||
12 | * @return void |
||
13 | */ |
||
14 | public function up() |
||
15 | { |
||
16 | Schema::enableForeignKeyConstraints(); |
||
17 | |||
18 | Schema::create('triadev_elasticsearch_migration_step', function (Blueprint $table) { |
||
19 | $table->bigIncrements('id'); |
||
20 | $table->unsignedBigInteger('migration_id'); |
||
21 | $table->string('type'); |
||
22 | $table->integer('status')->default( |
||
23 | \Triadev\EsMigration\Business\Mapper\MigrationStatus::MIGRATION_STATUS_WAIT |
||
24 | ); |
||
25 | $table->text('error')->nullable(); |
||
26 | $table->text('params'); |
||
27 | $table->integer('priority')->default(1); |
||
28 | $table->boolean('stop_on_failure')->default(true); |
||
29 | $table->timestamps(); |
||
30 | |||
31 | $table->foreign('migration_id') |
||
32 | ->references('id') |
||
33 | ->on('triadev_elasticsearch_migration') |
||
34 | ->onDelete('cascade'); |
||
35 | }); |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * Reverse the migrations. |
||
40 | * |
||
41 | * @return void |
||
42 | */ |
||
43 | public function down() |
||
44 | { |
||
45 | Schema::drop('triadev_elasticsearch_migration_step'); |
||
46 | } |
||
48 |