teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

migrationファイルの追記

2017/10/22 07:07

投稿

you88
you88

スコア147

title CHANGED
File without changes
body CHANGED
@@ -80,4 +80,37 @@
80
80
 
81
81
  ```
82
82
 
83
- なんですがcommenttableが反映されないのとなぜかposttableも一部しか反映されず。。。
83
+ なんですがcommenttableが反映されないのとなぜかposttableも一部しか反映されず。。。
84
+
85
+ 20171022_追記
86
+
87
+ 下記のmigrationファイルが反映されていないです。開発環境だとされています。
88
+
89
+ ```
90
+ class RenameSexColumnToGender < ActiveRecord::Migration[5.1]
91
+ def change
92
+ rename_column :posts, :sex, :gender
93
+ end
94
+ end
95
+ ```
96
+
97
+ ```
98
+ class CreateComments < ActiveRecord::Migration[5.1]
99
+ def change
100
+ create_table :comments do |t|
101
+
102
+ t.timestamps
103
+ end
104
+ end
105
+ end
106
+ ```
107
+
108
+ ```
109
+ class Comments < ActiveRecord::Migration[5.1]
110
+ def change
111
+ add_column :comments, :comment, :text
112
+ add_column :comments, :user_id, :integer
113
+ add_column :comments, :post_id, :integer
114
+ end
115
+ end
116
+ ```