質問編集履歴
1
マイグレーションファイルのコード追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -72,7 +72,24 @@
|
|
72
72
|
resources :items
|
73
73
|
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
|
74
74
|
end
|
75
|
+
|
75
76
|
ーーーーーーーーーーーーーーーーーーーーー
|
77
|
+
【migrate create_items.rb】
|
78
|
+
lass CreateItems < ActiveRecord::Migration[5.2]
|
79
|
+
def change
|
80
|
+
create_table :items do |t|
|
81
|
+
t.integer :photo
|
82
|
+
t.integer :genre
|
83
|
+
t.integer :category
|
84
|
+
t.text :brand
|
85
|
+
t.integer :season
|
86
|
+
|
87
|
+
t.timestamps
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
ーーーーーーーーーーーーーーーーーーーーー
|
76
93
|
ブラウザ上では、
|
77
94
|
登録された項目は
|
78
95
|
|