mirror of
https://github.com/internetee/registry.git
synced 2025-06-04 11:47:30 +02:00
Remove unused setting entries
This commit is contained in:
parent
915ebbff08
commit
b2f73bb5ab
2 changed files with 16 additions and 1 deletions
15
db/data/20200901131427_remove_unused_setting_entries.rb
Normal file
15
db/data/20200901131427_remove_unused_setting_entries.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
class RemoveUnusedSettingEntries < ActiveRecord::Migration[6.0]
|
||||
def up
|
||||
unused_fields = %w[eis_iban eis_bank eis_swift eis_invoice_contact ds_data_with_key_allowed]
|
||||
unused_fields.each do |stg|
|
||||
setting = SettingEntry.find_by(code: stg)
|
||||
next unless setting
|
||||
|
||||
setting.destroy
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
raise ActiveRecord::IrreversibleMigration
|
||||
end
|
||||
end
|
|
@ -1,2 +1,2 @@
|
|||
# encoding: UTF-8
|
||||
DataMigrate::Data.define(version: 20200702104334)
|
||||
DataMigrate::Data.define(version: 20200901131427)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue