Merge remote-tracking branch 'origin/master' into refactor-contact-archivation

This commit is contained in:
Karl Erik Õunapuu 2020-09-16 10:24:55 +03:00
commit ab1fa9064e
No known key found for this signature in database
GPG key ID: C9DD647298A34764
47 changed files with 453 additions and 290 deletions

View file

@ -0,0 +1,5 @@
class RemoveDomainsRegisteredAt < ActiveRecord::Migration[5.0]
def change
remove_column :domains, :registered_at
end
end

View file

@ -0,0 +1,9 @@
class RemoveImportFilePathFromBankStatements < ActiveRecord::Migration[6.0]
def up
remove_column :bank_statements, :import_file_path
end
def down
add_column :bank_statements, :import_file_path, :string
end
end

View file

@ -0,0 +1,5 @@
class ChangeInvoiceItemPriceScaleToThreePlaces < ActiveRecord::Migration[6.0]
def change
change_column :invoice_items, :price, :decimal, precision: 10, scale: 3
end
end

View file

@ -0,0 +1,26 @@
class CreateVersionForPrices < ActiveRecord::Migration[6.0]
def up
create_table :log_prices, force: :cascade do |t|
t.string :item_type, null: false
t.integer :item_id, null: false
t.string :event, null: false
t.string :whodunnit
t.json :object
t.json :object_changes
t.datetime :created_at
t.string :session
t.json :children
t.string :uuid
end
add_index 'log_prices', ['item_type', 'item_id'], name: 'index_log_prices_on_item_type_and_item_id', using: :btree
add_index 'log_prices', ['whodunnit'], name: 'index_log_prices_on_whodunnit', using: :btree
end
def down
remove_index :log_prices, name: 'index_log_prices_on_item_type_and_item_id'
remove_index :log_prices, name: 'index_log_prices_on_whodunnit'
drop_table :log_prices
end
end