質問編集履歴

2

文字の修正をしました。

2019/09/08 05:39

投稿

Tsuyoponpon
Tsuyoponpon

スコア33

test CHANGED
File without changes
test CHANGED
@@ -266,6 +266,40 @@
266
266
 
267
267
  ```
268
268
 
269
+ ```yml
270
+
271
+ #デプロイの前に、production環境を
272
+
273
+ production:
274
+
275
+ <<: *default
276
+
277
+ database: db/production.sqlite3
278
+
279
+
280
+
281
+ #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
282
+
283
+
284
+
285
+ production:
286
+
287
+ <<: *default
288
+
289
+ adapter: postgresql
290
+
291
+ encoding: unicode
292
+
293
+ pool: 5
294
+
295
+
296
+
297
+ #に変更しました。
298
+
299
+
300
+
301
+ ```
302
+
269
303
 
270
304
 
271
305
 

1

内容の追加

2019/09/08 05:39

投稿

Tsuyoponpon
Tsuyoponpon

スコア33

test CHANGED
File without changes
test CHANGED
@@ -58,7 +58,213 @@
58
58
 
59
59
 
60
60
 
61
-
61
+ ### renameしたmigrationfile
62
+
63
+ ```ruby
64
+
65
+ class RenamePictureColumnToPosts < ActiveRecord::Migration[5.1]
66
+
67
+ def change
68
+
69
+ rename_column :posts, :picture, :image
70
+
71
+ end
72
+
73
+ end
74
+
75
+
76
+
77
+ ```
78
+
79
+
80
+
81
+ ### schema.rb
82
+
83
+ ```ruby
84
+
85
+
86
+
87
+ ActiveRecord::Schema.define(version: 20190908051421) do
88
+
89
+
90
+
91
+ create_table "active_admin_comments", force: :cascade do |t|
92
+
93
+ t.string "namespace"
94
+
95
+ t.text "body"
96
+
97
+ t.string "resource_type"
98
+
99
+ t.integer "resource_id"
100
+
101
+ t.string "author_type"
102
+
103
+ t.integer "author_id"
104
+
105
+ t.datetime "created_at", null: false
106
+
107
+ t.datetime "updated_at", null: false
108
+
109
+ t.index ["author_type", "author_id"], name: "index_active_admin_comments_on_author_type_and_author_id"
110
+
111
+ t.index ["namespace"], name: "index_active_admin_comments_on_namespace"
112
+
113
+ t.index ["resource_type", "resource_id"], name: "index_active_admin_comments_on_resource_type_and_resource_id"
114
+
115
+ end
116
+
117
+
118
+
119
+ create_table "admin_accounts", force: :cascade do |t|
120
+
121
+ t.string "email", default: "", null: false
122
+
123
+ t.string "encrypted_password", default: "", null: false
124
+
125
+ t.string "reset_password_token"
126
+
127
+ t.datetime "reset_password_sent_at"
128
+
129
+ t.datetime "remember_created_at"
130
+
131
+ t.datetime "created_at", null: false
132
+
133
+ t.datetime "updated_at", null: false
134
+
135
+ t.index ["email"], name: "index_admin_accounts_on_email", unique: true
136
+
137
+ t.index ["reset_password_token"], name: "index_admin_accounts_on_reset_password_token", unique: true
138
+
139
+ end
140
+
141
+
142
+
143
+ create_table "comments", force: :cascade do |t|
144
+
145
+ t.string "content"
146
+
147
+ t.integer "post_id"
148
+
149
+ t.datetime "created_at", null: false
150
+
151
+ t.datetime "updated_at", null: false
152
+
153
+ t.string "user_name"
154
+
155
+ t.integer "user_id"
156
+
157
+ t.index ["post_id"], name: "index_comments_on_post_id"
158
+
159
+ end
160
+
161
+
162
+
163
+ create_table "likes", force: :cascade do |t|
164
+
165
+ t.integer "user_id"
166
+
167
+ t.integer "post_id"
168
+
169
+ t.datetime "created_at", null: false
170
+
171
+ t.datetime "updated_at", null: false
172
+
173
+ t.index ["post_id"], name: "index_likes_on_post_id"
174
+
175
+ t.index ["user_id"], name: "index_likes_on_user_id"
176
+
177
+ end
178
+
179
+
180
+
181
+ create_table "posts", force: :cascade do |t|
182
+
183
+ t.string "title"
184
+
185
+ t.text "content"
186
+
187
+ t.datetime "created_at", null: false
188
+
189
+ t.datetime "updated_at", null: false
190
+
191
+ t.integer "user_id"
192
+
193
+ t.integer "likes_count"
194
+
195
+ t.string "image"
196
+
197
+ t.string "video"
198
+
199
+ end
200
+
201
+
202
+
203
+ create_table "relationships", force: :cascade do |t|
204
+
205
+ t.integer "follower_id"
206
+
207
+ t.integer "following_id"
208
+
209
+ t.datetime "created_at", null: false
210
+
211
+ t.datetime "updated_at", null: false
212
+
213
+ t.index ["follower_id", "following_id"], name: "index_relationships_on_follower_id_and_following_id", unique: true
214
+
215
+ t.index ["follower_id"], name: "index_relationships_on_follower_id"
216
+
217
+ t.index ["following_id"], name: "index_relationships_on_following_id"
218
+
219
+ end
220
+
221
+
222
+
223
+ create_table "users", force: :cascade do |t|
224
+
225
+ t.string "email", default: "", null: false
226
+
227
+ t.string "encrypted_password", default: "", null: false
228
+
229
+ t.string "reset_password_token"
230
+
231
+ t.datetime "reset_password_sent_at"
232
+
233
+ t.datetime "remember_created_at"
234
+
235
+ t.integer "sign_in_count", default: 0, null: false
236
+
237
+ t.datetime "current_sign_in_at"
238
+
239
+ t.datetime "last_sign_in_at"
240
+
241
+ t.string "current_sign_in_ip"
242
+
243
+ t.string "last_sign_in_ip"
244
+
245
+ t.datetime "created_at", null: false
246
+
247
+ t.datetime "updated_at", null: false
248
+
249
+ t.string "name"
250
+
251
+ t.integer "age"
252
+
253
+ t.date "birthday"
254
+
255
+ t.index ["email"], name: "index_users_on_email", unique: true
256
+
257
+ t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
258
+
259
+ end
260
+
261
+
262
+
263
+ end
264
+
265
+
266
+
267
+ ```
62
268
 
63
269
 
64
270