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

質問編集履歴

1

マイグレーションファイルのソースコードを追加しました。

2020/05/09 16:39

投稿

退会済みユーザー
title CHANGED
@@ -1,1 +1,1 @@
1
- RailsPG::UndefinedTable: ERROR: relation "users" does not exist
1
+ Rails PostgreSQL】PG::UndefinedTable: ERROR: relation "users" does not exist
body CHANGED
@@ -42,6 +42,24 @@
42
42
  <% end %>
43
43
  ```
44
44
 
45
+ ```20200507090359_create_users.rb
46
+ class CreateUsers < ActiveRecord::Migration[5.2]
47
+ def change
48
+ create_table :users do |t|
49
+ t.text :name
50
+ t.text :user_id
51
+ t.text :email
52
+ t.text :password
53
+ t.integer :level
54
+ t.integer :contribution
55
+
56
+ t.timestamps
57
+ end
58
+ end
59
+ end
60
+
61
+ ```
62
+
45
63
  ### 試したこと
46
64
  1行目の
47
65
  ```