・やり方
1、users_tableとnotes_tableを関連付けるカラムをnotes_tableに作成する
・users_table ユーザー情報のテーブル
・notes_table 投稿情報のテーブル
notes_tableにuser_idカラムを作成する。これはusers_tableのidカラムと対応する。
2、マイグレーションファイルを作成する
コマンド
$ rails g migration マイグレーションファイル名 カラム名:データ型
3、データベースに反映させる
コマンド
$ rake db:migrate