mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-08 00:23:01 +08:00
11 lines
331 B
Ruby
11 lines
331 B
Ruby
|
class CreateMyModuleComments < ActiveRecord::Migration
|
||
|
def change
|
||
|
create_table :my_module_comments do |t|
|
||
|
t.integer :my_module_id, null: false
|
||
|
t.integer :comment_id, null: false
|
||
|
end
|
||
|
add_foreign_key :my_module_comments, :my_modules
|
||
|
add_index :my_module_comments, [:my_module_id, :comment_id]
|
||
|
end
|
||
|
end
|