mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Remove duplicate 'Annually' frequency
This commit is contained in:
parent
063766d7f6
commit
27311e4f5f
@ -45,6 +45,14 @@ class AddCustomContactFields extends Migration
|
||||
$table->string('transaction_reference')->nullable();
|
||||
$table->foreign('payment_type_id')->references('id')->on('payment_types');
|
||||
});
|
||||
|
||||
// remove duplicate annual frequency
|
||||
if (DB::table('frequencies')->count() == 9) {
|
||||
DB::statement('update invoices set frequency_id = 8 where is_recurring = 1 and frequency_id = 9');
|
||||
DB::statement('update accounts set reset_counter_frequency_id = 8 where reset_counter_frequency_id = 9');
|
||||
DB::statement('update frequencies set name = "Annually" where id = 8');
|
||||
DB::statement('delete from frequencies where id = 9');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user