質問編集履歴

1

マイグレーションファイルのコード追加

2019/03/23 05:28

投稿

Masskaz
Masskaz

スコア32

test CHANGED
File without changes
test CHANGED
@@ -146,6 +146,40 @@
146
146
 
147
147
  end
148
148
 
149
+
150
+
151
+ ーーーーーーーーーーーーーーーーーーーーー
152
+
153
+ 【migrate create_items.rb】
154
+
155
+ lass CreateItems < ActiveRecord::Migration[5.2]
156
+
157
+ def change
158
+
159
+ create_table :items do |t|
160
+
161
+ t.integer :photo
162
+
163
+ t.integer :genre
164
+
165
+ t.integer :category
166
+
167
+ t.text :brand
168
+
169
+ t.integer :season
170
+
171
+
172
+
173
+ t.timestamps
174
+
175
+ end
176
+
177
+ end
178
+
179
+ end
180
+
181
+
182
+
149
183
  ーーーーーーーーーーーーーーーーーーーーー
150
184
 
151
185
  ブラウザ上では、