Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Use dropIfExists
James Cole7399edee2e39
diff --git a/database/migrations/2016_06_16_000000_create_support_tables.php b/database/migrations/2016_06_16_000000_create_support_tables.phpindex 44dd6a2947..fc2c2e8779 100644--- a/database/migrations/2016_06_16_000000_create_support_tables.php+++ b/database/migrations/2016_06_16_000000_create_support_tables.php@@ -35,16 +35,16 @@ class CreateSupportTables extends Migration*/public function down(): void{- Schema::drop('account_types');- Schema::drop('transaction_currencies');- Schema::drop('transaction_types');- Schema::drop('jobs');- Schema::drop('password_resets');- Schema::drop('permission_role');- Schema::drop('permissions');- Schema::drop('roles');- Schema::drop('sessions');- Schema::drop('configuration');+ Schema::dropIfExists('account_types');+ Schema::dropIfExists('transaction_currencies');+ Schema::dropIfExists('transaction_types');+ Schema::dropIfExists('jobs');+ Schema::dropIfExists('password_resets');+ Schema::dropIfExists('permission_role');+ Schema::dropIfExists('permissions');+ Schema::dropIfExists('roles');+ Schema::dropIfExists('sessions');+ Schema::dropIfExists('configuration');}/**diff --git a/database/migrations/2016_06_16_000001_create_users_table.php b/database/migrations/2016_06_16_000001_create_users_table.phpindex 51202b645f..fee00a6117 100644--- a/database/migrations/2016_06_16_000001_create_users_table.php+++ b/database/migrations/2016_06_16_000001_create_users_table.php@@ -35,7 +35,7 @@ class CreateUsersTable extends Migration*/public function down(): void{- Schema::drop('users');+ Schema::dropIfExists('users');}/**diff --git a/database/migrations/2016_06_16_000002_create_main_tables.php b/database/migrations/2016_06_16_000002_create_main_tables.phpindex d77790a81d..dcb26c5884 100644--- a/database/migrations/2016_06_16_000002_create_main_tables.php+++ b/database/migrations/2016_06_16_000002_create_main_tables.php@@ -35,34 +35,34 @@ class CreateMainTables extends Migration*/public function down(): void{- Schema::drop('account_meta');- Schema::drop('piggy_bank_repetitions');- Schema::drop('attachments');- Schema::drop('limit_repetitions');- Schema::drop('budget_limits');- Schema::drop('export_jobs');- Schema::drop('import_jobs');- Schema::drop('preferences');- Schema::drop('role_user');- Schema::drop('rule_actions');- Schema::drop('rule_triggers');- Schema::drop('rules');- Schema::drop('rule_groups');- Schema::drop('category_transaction');- Schema::drop('budget_transaction');- Schema::drop('transactions');- Schema::drop('piggy_bank_events');- Schema::drop('piggy_banks');- Schema::drop('accounts');- Schema::drop('category_transaction_journal');- Schema::drop('budget_transaction_journal');- Schema::drop('categories');- Schema::drop('budgets');- Schema::drop('tag_transaction_journal');- Schema::drop('tags');- Schema::drop('journal_meta');- Schema::drop('transaction_journals');- Schema::drop('bills');+ Schema::dropIfExists('account_meta');+ Schema::dropIfExists('piggy_bank_repetitions');+ Schema::dropIfExists('attachments');+ Schema::dropIfExists('limit_repetitions');+ Schema::dropIfExists('budget_limits');+ Schema::dropIfExists('export_jobs');+ Schema::dropIfExists('import_jobs');+ Schema::dropIfExists('preferences');+ Schema::dropIfExists('role_user');+ Schema::dropIfExists('rule_actions');+ Schema::dropIfExists('rule_triggers');+ Schema::dropIfExists('rules');+ Schema::dropIfExists('rule_groups');+ Schema::dropIfExists('category_transaction');+ Schema::dropIfExists('budget_transaction');+ Schema::dropIfExists('transactions');+ Schema::dropIfExists('piggy_bank_events');+ Schema::dropIfExists('piggy_banks');+ Schema::dropIfExists('accounts');+ Schema::dropIfExists('category_transaction_journal');+ Schema::dropIfExists('budget_transaction_journal');+ Schema::dropIfExists('categories');+ Schema::dropIfExists('budgets');+ Schema::dropIfExists('tag_transaction_journal');+ Schema::dropIfExists('tags');+ Schema::dropIfExists('journal_meta');+ Schema::dropIfExists('transaction_journals');+ Schema::dropIfExists('bills');}/**diff --git a/database/migrations/2017_04_13_163623_changes_for_v440.php b/database/migrations/2017_04_13_163623_changes_for_v440.phpindex e188710bad..091623502c 100644--- a/database/migrations/2017_04_13_163623_changes_for_v440.php+++ b/database/migrations/2017_04_13_163623_changes_for_v440.php@@ -36,7 +36,7 @@ class ChangesForV440 extends Migrationpublic function down(): void{if (Schema::hasTable('currency_exchange_rates')) {- Schema::drop('currency_exchange_rates');+ Schema::dropIfExists('currency_exchange_rates');}Schema::table(diff --git a/database/migrations/2018_01_01_000001_create_oauth_auth_codes_table.php b/database/migrations/2018_01_01_000001_create_oauth_auth_codes_table.phpindex 9936125826..9b6851feaf 100644--- a/database/migrations/2018_01_01_000001_create_oauth_auth_codes_table.php+++ b/database/migrations/2018_01_01_000001_create_oauth_auth_codes_table.php@@ -38,7 +38,7 @@ class CreateOauthAuthCodesTable extends Migration*/public function down(): void{- Schema::drop('oauth_auth_codes');+ Schema::dropIfExists('oauth_auth_codes');}/**diff --git a/database/migrations/2018_01_01_000002_create_oauth_access_tokens_table.php b/database/migrations/2018_01_01_000002_create_oauth_access_tokens_table.phpindex a80077fde9..e8e95975f2 100644--- a/database/migrations/2018_01_01_000002_create_oauth_access_tokens_table.php+++ b/database/migrations/2018_01_01_000002_create_oauth_access_tokens_table.php@@ -38,7 +38,7 @@ class CreateOauthAccessTokensTable extends Migration*/public function down(): void{- Schema::drop('oauth_access_tokens');+ Schema::dropIfExists('oauth_access_tokens');}/**diff --git a/database/migrations/2018_01_01_000003_create_oauth_refresh_tokens_table.php b/database/migrations/2018_01_01_000003_create_oauth_refresh_tokens_table.phpindex 945fcd37b2..513e34b852 100644--- a/database/migrations/2018_01_01_000003_create_oauth_refresh_tokens_table.php+++ b/database/migrations/2018_01_01_000003_create_oauth_refresh_tokens_table.php@@ -38,7 +38,7 @@ class CreateOauthRefreshTokensTable extends Migration*/public function down(): void{- Schema::drop('oauth_refresh_tokens');+ Schema::dropIfExists('oauth_refresh_tokens');}/**diff --git a/database/migrations/2018_01_01_000004_create_oauth_clients_table.php b/database/migrations/2018_01_01_000004_create_oauth_clients_table.phpindex a98019c89b..c06869e26d 100644--- a/database/migrations/2018_01_01_000004_create_oauth_clients_table.php+++ b/database/migrations/2018_01_01_000004_create_oauth_clients_table.php@@ -38,7 +38,7 @@ class CreateOauthClientsTable extends Migration*/public function down(): void{- Schema::drop('oauth_clients');+ Schema::dropIfExists('oauth_clients');}/**diff --git a/database/migrations/2018_01_01_000005_create_oauth_personal_access_clients_table.php b/database/migrations/2018_01_01_000005_create_oauth_personal_access_clients_table.phpindex 95b52f4e1f..228fcf05fd 100644--- a/database/migrations/2018_01_01_000005_create_oauth_personal_access_clients_table.php+++ b/database/migrations/2018_01_01_000005_create_oauth_personal_access_clients_table.php@@ -38,7 +38,7 @@ class CreateOauthPersonalAccessClientsTable extends Migration*/public function down(): void{- Schema::drop('oauth_personal_access_clients');+ Schema::dropIfExists('oauth_personal_access_clients');}/**diff --git a/database/migrations/2020_11_12_070604_changes_for_v550.php b/database/migrations/2020_11_12_070604_changes_for_v550.phpindex b6494f6886..9cec0a1dcf 100644--- a/database/migrations/2020_11_12_070604_changes_for_v550.php+++ b/database/migrations/2020_11_12_070604_changes_for_v550.php@@ -39,7 +39,7 @@ class ChangesForV550 extends Migrationpublic function down(){// recreate jobs table.- Schema::drop('jobs');+ Schema::dropIfExists('jobs');Schema::create('jobs',static function (Blueprint $table) {@@ -88,7 +88,7 @@ class ChangesForV550 extends Migrationpublic function up(){// drop and recreate jobs table.- Schema::drop('jobs');+ Schema::dropIfExists('jobs');// this is the NEW tableSchema::create('jobs', function (Blueprint $table) {