initial data model implementation
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class CreateComments < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
create_table :comments do |t|
|
||||
t.references :user, null: false, foreign_key: true
|
||||
t.references :commentable, polymorphic: true, null: false
|
||||
t.text :body, null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user