質問編集履歴
1
見やすさ
test
CHANGED
File without changes
|
test
CHANGED
@@ -26,8 +26,6 @@
|
|
26
26
|
|
27
27
|
⑤確認の為、rails db:rollbackを試したところエラーが出てしまいました。
|
28
28
|
|
29
|
-
remove_index(:notifications, :post_id)でエラーが出ているようなのですが原因や解決方法を調べるも分からず質問をさせて頂きたいです。
|
30
|
-
よろしくお願いいたします。
|
31
29
|
|
32
30
|
<rails db:rollback時のエラー文>
|
33
31
|
|
@@ -41,7 +39,9 @@
|
|
41
39
|
No indexes found on notifications with the options provided.
|
42
40
|
/home/ec2-user/.rvm/gems/ruby-2.6.3/gems/activerecord-6.1.5.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:1411:in `index_name_for_remove'
|
43
41
|
```
|
42
|
+
|
43
|
+
|
44
|
-
schemaファイル変更反映箇所
|
44
|
+
<schemaファイル変更反映箇所>
|
45
45
|
t.index ["post_id"]→t.index ["item_id"]
|
46
46
|
```html
|
47
47
|
create_table "notifications", force: :cascade do |t|
|
@@ -60,7 +60,9 @@
|
|
60
60
|
end
|
61
61
|
|
62
62
|
```
|
63
|
+
|
64
|
+
|
63
|
-
マイグレーションファイルの状態
|
65
|
+
<マイグレーションファイルの状態>
|
64
66
|
|
65
67
|
```html
|
66
68
|
database: db/development.sqlite3
|
@@ -70,3 +72,7 @@
|
|
70
72
|
up 20220705022642 Create notifications
|
71
73
|
up 20220705030923 Add item to notifications
|
72
74
|
```
|
75
|
+
|
76
|
+
remove_index(:notifications, :post_id)でエラーが出ているようなのですが原因や解決方法を調べるも分からず質問をさせて頂きたいです。
|
77
|
+
よろしくお願いいたします。
|
78
|
+
|