mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
Domain versioning
This commit is contained in:
parent
d94eb22fc6
commit
a41505e319
16 changed files with 212 additions and 30 deletions
18
db/migrate/20140926121409_domain_related_archives.rb
Normal file
18
db/migrate/20140926121409_domain_related_archives.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
class DomainRelatedArchives < ActiveRecord::Migration
|
||||
def change
|
||||
tables = [:domain_versions, :nameserver_versions, :domain_status_versions ]
|
||||
tables.each do |table|
|
||||
create_table table do |t|
|
||||
t.string :item_type, :null => false
|
||||
t.integer :item_id, :null => false
|
||||
t.string :event, :null => false
|
||||
t.string :whodunnit
|
||||
t.text :object
|
||||
t.datetime :created_at
|
||||
end
|
||||
add_index table, [:item_type, :item_id]
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue