From 6f96b25440d2ffdc823552162aa3ff7d8f8c6419 Mon Sep 17 00:00:00 2001 From: snipe Date: Sun, 26 Sep 2021 15:48:43 -0700 Subject: [PATCH] Attempt fix at Laravel "magic" class in migrations resulting in table already exists Signed-off-by: snipe --- ...1_15_190357_create_temp_licenses_table.php | 46 +++++++++++++++++++ .../2013_11_17_054359_drop_licenses_table.php | 2 +- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100755 database/migrations/2013_11_15_190357_create_temp_licenses_table.php diff --git a/database/migrations/2013_11_15_190357_create_temp_licenses_table.php b/database/migrations/2013_11_15_190357_create_temp_licenses_table.php new file mode 100755 index 000000000..9ece1303b --- /dev/null +++ b/database/migrations/2013_11_15_190357_create_temp_licenses_table.php @@ -0,0 +1,46 @@ +increments('id'); + $table->string('name'); + $table->integer('model_id'); + $table->text('serial'); + $table->string('license_email'); + $table->string('license_name'); + $table->date('purchase_date')->nullable(); + $table->decimal('purchase_cost', 8, 2)->nullable(); + $table->string('order_number'); + $table->integer('assigned_to'); + $table->text('notes'); + $table->integer('user_id')->nullable(); + $table->timestamps(); + $table->engine = 'InnoDB'; + }); + } + + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('licenses'); + } +} diff --git a/database/migrations/2013_11_17_054359_drop_licenses_table.php b/database/migrations/2013_11_17_054359_drop_licenses_table.php index 6fbc11703..e8c3d6b07 100755 --- a/database/migrations/2013_11_17_054359_drop_licenses_table.php +++ b/database/migrations/2013_11_17_054359_drop_licenses_table.php @@ -11,7 +11,7 @@ class DropLicensesTable extends Migration */ public function up() { - Schema::drop('licenses'); + Schema::dropIfExists('licenses'); } /**