Add artist commentary, fixes #2024
This commit is contained in:
19
db/migrate/20131117150705_create_artist_commentaries.rb
Normal file
19
db/migrate/20131117150705_create_artist_commentaries.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
class CreateArtistCommentaries < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :artist_commentaries do |t|
|
||||
t.integer :post_id, :null => false
|
||||
t.text :original_title
|
||||
t.text :original_description
|
||||
t.text :translated_title
|
||||
t.text :translated_description
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :artist_commentaries, :post_id, :unique => true
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :artist_commentaries
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,24 @@
|
||||
class CreateArtistCommentaryVersions < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :artist_commentary_versions do |t|
|
||||
t.integer :post_id, :null => false
|
||||
|
||||
t.integer :updater_id, :null => false
|
||||
t.column :updater_ip_addr, "inet", :null => false
|
||||
|
||||
t.text :original_title
|
||||
t.text :original_description
|
||||
t.text :translated_title
|
||||
t.text :translated_description
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :artist_commentary_versions, :post_id
|
||||
add_index :artist_commentary_versions, :updater_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :artist_commentary_versions
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user