mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-26 16:26:35 -06:00
Use dropIfExists
This commit is contained in:
parent
ec93b7b5a0
commit
7399edee2e
@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,7 +35,7 @@ class CreateUsersTable extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::drop('users');
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -36,7 +36,7 @@ class ChangesForV440 extends Migration
|
||||
public function down(): void
|
||||
{
|
||||
if (Schema::hasTable('currency_exchange_rates')) {
|
||||
Schema::drop('currency_exchange_rates');
|
||||
Schema::dropIfExists('currency_exchange_rates');
|
||||
}
|
||||
|
||||
Schema::table(
|
||||
|
@ -38,7 +38,7 @@ class CreateOauthAuthCodesTable extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::drop('oauth_auth_codes');
|
||||
Schema::dropIfExists('oauth_auth_codes');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -38,7 +38,7 @@ class CreateOauthAccessTokensTable extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::drop('oauth_access_tokens');
|
||||
Schema::dropIfExists('oauth_access_tokens');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -38,7 +38,7 @@ class CreateOauthRefreshTokensTable extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::drop('oauth_refresh_tokens');
|
||||
Schema::dropIfExists('oauth_refresh_tokens');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -38,7 +38,7 @@ class CreateOauthClientsTable extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::drop('oauth_clients');
|
||||
Schema::dropIfExists('oauth_clients');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -38,7 +38,7 @@ class CreateOauthPersonalAccessClientsTable extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::drop('oauth_personal_access_clients');
|
||||
Schema::dropIfExists('oauth_personal_access_clients');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -39,7 +39,7 @@ class ChangesForV550 extends Migration
|
||||
public 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 Migration
|
||||
public function up()
|
||||
{
|
||||
// drop and recreate jobs table.
|
||||
Schema::drop('jobs');
|
||||
Schema::dropIfExists('jobs');
|
||||
// this is the NEW table
|
||||
Schema::create(
|
||||
'jobs', function (Blueprint $table) {
|
||||
|
Loading…
Reference in New Issue
Block a user