From d8f20216042627b1338a0a8327464906202b16a0 Mon Sep 17 00:00:00 2001 From: Ariel Juodziukynas Date: Sun, 18 Jun 2023 21:30:46 -0300 Subject: [PATCH] Fix the last migration to actually create the users table (#20) --- .../20230516150928_add_auth_columns_to_user.rb | 9 --------- db/migrate/20230516150928_create_users.rb | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 9 deletions(-) delete mode 100644 db/migrate/20230516150928_add_auth_columns_to_user.rb create mode 100644 db/migrate/20230516150928_create_users.rb diff --git a/db/migrate/20230516150928_add_auth_columns_to_user.rb b/db/migrate/20230516150928_add_auth_columns_to_user.rb deleted file mode 100644 index 7166ebb..0000000 --- a/db/migrate/20230516150928_add_auth_columns_to_user.rb +++ /dev/null @@ -1,9 +0,0 @@ -class AddAuthColumnsToUser < ActiveRecord::Migration[7.0] - def change - change_table :users do |t| - t.string :provider - t.string :uid, unique: true - t.string :name - end - end -end diff --git a/db/migrate/20230516150928_create_users.rb b/db/migrate/20230516150928_create_users.rb new file mode 100644 index 0000000..032af53 --- /dev/null +++ b/db/migrate/20230516150928_create_users.rb @@ -0,0 +1,18 @@ +class CreateUsers < ActiveRecord::Migration[7.0] + def change + create_table "users", force: :cascade do |t| + t.string "email", default: "", null: false + t.string "encrypted_password", default: "", null: false + t.string "reset_password_token" + t.datetime "reset_password_sent_at" + t.datetime "remember_created_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "provider" + t.string "uid" + t.string "name" + t.index ["email"], name: "index_users_on_email", unique: true + t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true + end + end +end