Check if the eol_explicit column exists yet, add it if not

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-10-13 12:19:32 +01:00
parent 0b39591d88
commit ea960c39bb

View file

@ -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');
}
});