full_stack_twitter_clone/db/migrate/20220328041849_create_tweet...

11 lines
214 B
Ruby

class CreateTweets < ActiveRecord::Migration[6.1]
def change
create_table :tweets do |t|
t.string :message
t.belongs_to :user, index: true, foreign_key: true
t.timestamps
end
end
end