mirror of
https://github.com/internetee/registry.git
synced 2025-05-22 04:09:52 +02:00
25 lines
661 B
Ruby
25 lines
661 B
Ruby
class AddPricelist < ActiveRecord::Migration
|
|
def change
|
|
create_table :pricelists do |t|
|
|
t.string :name
|
|
t.string :category
|
|
t.monetize :price
|
|
t.datetime :valid_from
|
|
t.datetime :valid_to
|
|
t.string :creator_str
|
|
t.string :updator_str
|
|
t.timestamps null: false
|
|
end
|
|
|
|
create_table :log_pricelists 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
|
|
end
|
|
end
|
|
end
|