Files
AmbienteJa/db/migrate/20190529154253_create_active_admin_comments.rb
2019-05-29 19:14:37 +03:00

17 lines
414 B
Ruby

class CreateActiveAdminComments < ActiveRecord::Migration[5.2]
def self.up
create_table :active_admin_comments do |t|
t.string :namespace
t.text :body
t.references :resource, polymorphic: true
t.references :author, polymorphic: true
t.timestamps
end
add_index :active_admin_comments, [:namespace]
end
def self.down
drop_table :active_admin_comments
end
end