mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Check for column
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
43e370f35a
commit
e833052e8e
|
@ -13,11 +13,13 @@ class AddEulaToCheckoutAcceptance extends Migration
|
||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
|
if (!Schema::hasColumn('checkout_acceptances', 'stored_eula')) {
|
||||||
Schema::table('checkout_acceptances', function (Blueprint $table) {
|
Schema::table('checkout_acceptances', function (Blueprint $table) {
|
||||||
$table->text('stored_eula')->nullable()->default(null);
|
$table->text('stored_eula')->nullable()->default(null);
|
||||||
$table->string('stored_eula_file')->nullable()->default(null);
|
$table->string('stored_eula_file')->nullable()->default(null);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reverse the migrations.
|
* Reverse the migrations.
|
||||||
|
@ -26,6 +28,7 @@ class AddEulaToCheckoutAcceptance extends Migration
|
||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
|
if (Schema::hasColumn('checkout_acceptances', 'stored_eula')) {
|
||||||
Schema::table('checkout_acceptances', function (Blueprint $table) {
|
Schema::table('checkout_acceptances', function (Blueprint $table) {
|
||||||
if (Schema::hasColumn('checkout_acceptances', 'stored_eula')) {
|
if (Schema::hasColumn('checkout_acceptances', 'stored_eula')) {
|
||||||
$table->dropColumn('stored_eula');
|
$table->dropColumn('stored_eula');
|
||||||
|
@ -35,4 +38,5 @@ class AddEulaToCheckoutAcceptance extends Migration
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue