Skip to content

Commit

Permalink
Stop migration pipeline on failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Lorke committed Oct 20, 2018
1 parent ea34350 commit de2449d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ public function up()
Schema::create('triadev_elasticsearch_migration', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('migration');
$table->integer('status');
$table->integer('status')->default(
\Triadev\EsMigration\Business\Mapper\MigrationStatus::MIGRATION_STATUS_WAIT
);
$table->text('error')->nullable();
$table->boolean('stop_on_failure')->default(true);
$table->timestamps();
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ public function up()
$table->bigIncrements('id');
$table->bigInteger('migration_id');
$table->string('type');
$table->integer('status');
$table->integer('status')->default(
\Triadev\EsMigration\Business\Mapper\MigrationStatus::MIGRATION_STATUS_WAIT
);
$table->text('error')->nullable();
$table->text('params');
$table->integer('priority');
$table->integer('priority')->default(1);
$table->boolean('stop_on_failure')->default(true);
$table->timestamps();

$table->foreign('migration_id')->references('id')->on('triadev_elasticsearch_migration');
Expand Down
1 change: 1 addition & 0 deletions src/Models/Entity/ElasticsearchMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @property string $migration
* @property string $status
* @property string|null $error
* @property bool $stop_on_failure
*/
class ElasticsearchMigration extends Model
{
Expand Down
1 change: 1 addition & 0 deletions src/Models/Entity/ElasticsearchMigrationStep.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* @property string|null $error
* @property string $params
* @property integer $priority
* @property bool $stop_on_failure
* @property string $created_at
* @property string $updated_at
*/
Expand Down

0 comments on commit de2449d

Please sign in to comment.