This commit is contained in:
João Victor Geonizeli
2022-02-27 17:02:37 -03:00
parent 53c7d35d74
commit 1d692b31f8
13 changed files with 258 additions and 3 deletions

View File

@@ -0,0 +1,11 @@
class CreatePosts < ActiveRecord::Migration[7.0]
def change
create_table :posts do |t|
t.text :content, null: true
t.references :user, null: false, references: :user, foreign_key: { to_table: :users }
t.references :quoted_post, null: true, references: :post, foreign_key: { to_table: :posts }
t.timestamps
end
end
end