Skip to content

Commit

Permalink
Check if the eol_explicit column exists yet, add it if not
Browse files Browse the repository at this point in the history
Signed-off-by: snipe <[email protected]>
  • Loading branch information
snipe committed Oct 13, 2023
1 parent 0b39591 commit ea960c3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class DenormalizedEolAndAddColumnForExplicitDateToAssets extends Migration
public function up()
{
Schema::table('assets', function (Blueprint $table) {
$table->boolean('eol_explicit')->default(false)->after('asset_eol_date');
if (!Schema::hasColumn('assets', 'eol_explicit')) {
$table->boolean('eol_explicit')->default(false)->after('asset_eol_date');
}
});


Expand Down

0 comments on commit ea960c3

Please sign in to comment.