2025-01-19 01:13:59 +08:00
|
|
|
class CreateActiveAdminComments < ActiveRecord::Migration[8.0]
|
|
|
|
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
|
2025-01-20 18:08:55 +08:00
|
|
|
add_index :active_admin_comments, [ :namespace ]
|
2025-01-19 01:13:59 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
drop_table :active_admin_comments
|
|
|
|
end
|
|
|
|
end
|