質問編集履歴
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -114,6 +114,60 @@
|
|
114
114
|
|
115
115
|
|
116
116
|
|
117
|
+
```
|
118
|
+
|
119
|
+
item.rb
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
class CreateItems < ActiveRecord::Migration[5.2]
|
124
|
+
|
125
|
+
def change
|
126
|
+
|
127
|
+
create_table :items do |t|
|
128
|
+
|
129
|
+
t.string :name, null: false, index: true
|
130
|
+
|
131
|
+
t.integer :price, null: false
|
132
|
+
|
133
|
+
t.text :description, null: false
|
134
|
+
|
135
|
+
t.integer :condition
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
t.integer :shipping_from, null: false
|
140
|
+
|
141
|
+
t.integer :days_before_shipping, null: false
|
142
|
+
|
143
|
+
t.integer :shipping_method, null: false
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
t.integer :brand
|
148
|
+
|
149
|
+
t.integer :category
|
150
|
+
|
151
|
+
t.bigint :buyer_id
|
152
|
+
|
153
|
+
t.references :user, null: false, index: true, foreign_key: true
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
t.timestamps
|
158
|
+
|
159
|
+
end
|
160
|
+
|
161
|
+
end
|
162
|
+
|
163
|
+
end
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
```
|
168
|
+
|
169
|
+
|
170
|
+
|
117
171
|
### 試したこと
|
118
172
|
|
119
173
|
|