From ef19bc7c166a5c29228926484ee4ef5336cf80b7 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 3 Oct 2017 02:05:22 -0700 Subject: [PATCH] Workaround to fix #4117 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This shouldn’t be necessary, but it looks like some folks missed the migration that drops the FK for company_id --- .../2017_10_03_015503_drop_foreign_keys.php | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 database/migrations/2017_10_03_015503_drop_foreign_keys.php diff --git a/database/migrations/2017_10_03_015503_drop_foreign_keys.php b/database/migrations/2017_10_03_015503_drop_foreign_keys.php new file mode 100644 index 000000000..37ef6ae68 --- /dev/null +++ b/database/migrations/2017_10_03_015503_drop_foreign_keys.php @@ -0,0 +1,77 @@ +dropForeign(['company_id']); + }); + } catch (\Exception $e) { + //echo $e; + } + + try { + Schema::table('users', function (Blueprint $table) { + $table->dropForeign(['company_id']); + }); + } catch (\Exception $e) { + //echo $e; + } + + try { + Schema::table('assets', function (Blueprint $table) { + $table->dropForeign(['company_id']); + }); + } catch (\Exception $e) { + //echo $e; + } + + try { + Schema::table('components', function (Blueprint $table) { + $table->dropForeign(['company_id']); + }); + } catch (\Exception $e) { + //echo $e; + } + + try { + Schema::table('consumables', function (Blueprint $table) { + $table->dropForeign(['company_id']); + }); + } catch (\Exception $e) { + //echo $e; + } + + try { + Schema::table('licenses', function (Blueprint $table) { + $table->dropForeign(['company_id']); + }); + } catch (\Exception $e) { + //echo $e; + } + + + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +}