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

質問編集履歴

2

文字の修正をしました。

2019/09/08 05:39

投稿

Tsuyoponpon
Tsuyoponpon

スコア33

title CHANGED
File without changes
body CHANGED
@@ -132,6 +132,23 @@
132
132
  end
133
133
 
134
134
  ```
135
+ ```yml
136
+ #デプロイの前に、production環境を
137
+ production:
138
+ <<: *default
139
+ database: db/production.sqlite3
135
140
 
141
+ #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
136
142
 
143
+ production:
144
+ <<: *default
145
+ adapter: postgresql
146
+ encoding: unicode
147
+ pool: 5
148
+
149
+ #に変更しました。
150
+
151
+ ```
152
+
153
+
137
154
  解決策をご存知の方、ぜひご教授をいただければと思います。

1

内容の追加

2019/09/08 05:39

投稿

Tsuyoponpon
Tsuyoponpon

スコア33

title CHANGED
File without changes
body CHANGED
@@ -28,7 +28,110 @@
28
28
  gem 'carrierwave'
29
29
  gem 'mini_magick'
30
30
 
31
+ ### renameしたmigrationfile
32
+ ```ruby
33
+ class RenamePictureColumnToPosts < ActiveRecord::Migration[5.1]
34
+ def change
35
+ rename_column :posts, :picture, :image
36
+ end
37
+ end
31
38
 
39
+ ```
32
40
 
41
+ ### schema.rb
42
+ ```ruby
33
43
 
44
+ ActiveRecord::Schema.define(version: 20190908051421) do
45
+
46
+ create_table "active_admin_comments", force: :cascade do |t|
47
+ t.string "namespace"
48
+ t.text "body"
49
+ t.string "resource_type"
50
+ t.integer "resource_id"
51
+ t.string "author_type"
52
+ t.integer "author_id"
53
+ t.datetime "created_at", null: false
54
+ t.datetime "updated_at", null: false
55
+ t.index ["author_type", "author_id"], name: "index_active_admin_comments_on_author_type_and_author_id"
56
+ t.index ["namespace"], name: "index_active_admin_comments_on_namespace"
57
+ t.index ["resource_type", "resource_id"], name: "index_active_admin_comments_on_resource_type_and_resource_id"
58
+ end
59
+
60
+ create_table "admin_accounts", force: :cascade do |t|
61
+ t.string "email", default: "", null: false
62
+ t.string "encrypted_password", default: "", null: false
63
+ t.string "reset_password_token"
64
+ t.datetime "reset_password_sent_at"
65
+ t.datetime "remember_created_at"
66
+ t.datetime "created_at", null: false
67
+ t.datetime "updated_at", null: false
68
+ t.index ["email"], name: "index_admin_accounts_on_email", unique: true
69
+ t.index ["reset_password_token"], name: "index_admin_accounts_on_reset_password_token", unique: true
70
+ end
71
+
72
+ create_table "comments", force: :cascade do |t|
73
+ t.string "content"
74
+ t.integer "post_id"
75
+ t.datetime "created_at", null: false
76
+ t.datetime "updated_at", null: false
77
+ t.string "user_name"
78
+ t.integer "user_id"
79
+ t.index ["post_id"], name: "index_comments_on_post_id"
80
+ end
81
+
82
+ create_table "likes", force: :cascade do |t|
83
+ t.integer "user_id"
84
+ t.integer "post_id"
85
+ t.datetime "created_at", null: false
86
+ t.datetime "updated_at", null: false
87
+ t.index ["post_id"], name: "index_likes_on_post_id"
88
+ t.index ["user_id"], name: "index_likes_on_user_id"
89
+ end
90
+
91
+ create_table "posts", force: :cascade do |t|
92
+ t.string "title"
93
+ t.text "content"
94
+ t.datetime "created_at", null: false
95
+ t.datetime "updated_at", null: false
96
+ t.integer "user_id"
97
+ t.integer "likes_count"
98
+ t.string "image"
99
+ t.string "video"
100
+ end
101
+
102
+ create_table "relationships", force: :cascade do |t|
103
+ t.integer "follower_id"
104
+ t.integer "following_id"
105
+ t.datetime "created_at", null: false
106
+ t.datetime "updated_at", null: false
107
+ t.index ["follower_id", "following_id"], name: "index_relationships_on_follower_id_and_following_id", unique: true
108
+ t.index ["follower_id"], name: "index_relationships_on_follower_id"
109
+ t.index ["following_id"], name: "index_relationships_on_following_id"
110
+ end
111
+
112
+ create_table "users", force: :cascade do |t|
113
+ t.string "email", default: "", null: false
114
+ t.string "encrypted_password", default: "", null: false
115
+ t.string "reset_password_token"
116
+ t.datetime "reset_password_sent_at"
117
+ t.datetime "remember_created_at"
118
+ t.integer "sign_in_count", default: 0, null: false
119
+ t.datetime "current_sign_in_at"
120
+ t.datetime "last_sign_in_at"
121
+ t.string "current_sign_in_ip"
122
+ t.string "last_sign_in_ip"
123
+ t.datetime "created_at", null: false
124
+ t.datetime "updated_at", null: false
125
+ t.string "name"
126
+ t.integer "age"
127
+ t.date "birthday"
128
+ t.index ["email"], name: "index_users_on_email", unique: true
129
+ t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
130
+ end
131
+
132
+ end
133
+
134
+ ```
135
+
136
+
34
137
  解決策をご存知の方、ぜひご教授をいただければと思います。