mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 00:42:04 +02:00
Merge remote-tracking branch 'origin/master' into refactor-contact-archivation
This commit is contained in:
commit
ab1fa9064e
47 changed files with 453 additions and 290 deletions
|
@ -0,0 +1,5 @@
|
|||
class RemoveDomainsRegisteredAt < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
remove_column :domains, :registered_at
|
||||
end
|
||||
end
|
|
@ -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
|
|
@ -0,0 +1,5 @@
|
|||
class ChangeInvoiceItemPriceScaleToThreePlaces < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
change_column :invoice_items, :price, :decimal, precision: 10, scale: 3
|
||||
end
|
||||
end
|
26
db/migrate/20200910102028_create_version_for_prices.rb
Normal file
26
db/migrate/20200910102028_create_version_for_prices.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue