mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Added the temp column back in
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
2537d0fdaf
commit
ca1420c9bd
|
@ -17,9 +17,18 @@ class AddEolDateOnAssetsTable extends Migration
|
||||||
{
|
{
|
||||||
|
|
||||||
Schema::table('assets', function (Blueprint $table) {
|
Schema::table('assets', function (Blueprint $table) {
|
||||||
|
|
||||||
if (!Schema::hasColumn('assets', 'asset_eol_date')) {
|
if (!Schema::hasColumn('assets', 'asset_eol_date')) {
|
||||||
$table->date('asset_eol_date')->after('purchase_date')->nullable()->default(null);
|
$table->date('asset_eol_date')->after('purchase_date')->nullable()->default(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is a temporary shim so we don't have to modify the asset observer for migrations where
|
||||||
|
// there is a large version difference. (See the AssetObserver notes). This column gets created
|
||||||
|
// later in 2023_07_13_052204_denormalized_eol_and_add_column_for_explicit_date_to_assets.php
|
||||||
|
// but we have to temporarily create it now so the save method below doesn't break
|
||||||
|
if (!Schema::hasColumn('assets', 'eol_explicit')) {
|
||||||
|
$table->boolean('eol_explicit')->default(false)->after('asset_eol_date');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Chunk the model query to get the models that do have an EOL date
|
// Chunk the model query to get the models that do have an EOL date
|
||||||
|
|
Loading…
Reference in a new issue