From 76b2738b012733f370a10472e9b275f786b428e5 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Wed, 27 Sep 2023 07:22:11 -0500 Subject: [PATCH] Commit database changes as well --- db/migrate/20230927121300_add_admin_to_users.rb | 5 +++++ db/migrate/20230927122117_make_reviews_a_join_table.rb | 4 ++++ db/schema.rb | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20230927121300_add_admin_to_users.rb create mode 100644 db/migrate/20230927122117_make_reviews_a_join_table.rb diff --git a/db/migrate/20230927121300_add_admin_to_users.rb b/db/migrate/20230927121300_add_admin_to_users.rb new file mode 100644 index 0000000..6ecec48 --- /dev/null +++ b/db/migrate/20230927121300_add_admin_to_users.rb @@ -0,0 +1,5 @@ +class AddAdminToUsers < ActiveRecord::Migration[7.0] + def change + add_column :users, :admin, :boolean, default: false + end +end diff --git a/db/migrate/20230927122117_make_reviews_a_join_table.rb b/db/migrate/20230927122117_make_reviews_a_join_table.rb new file mode 100644 index 0000000..dce0620 --- /dev/null +++ b/db/migrate/20230927122117_make_reviews_a_join_table.rb @@ -0,0 +1,4 @@ +class MakeReviewsAJoinTable < ActiveRecord::Migration[7.0] + def change + end +end diff --git a/db/schema.rb b/db/schema.rb index 6938b67..6b53739 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_09_26_182250) do +ActiveRecord::Schema[7.0].define(version: 2023_09_27_121300) do create_table "movies", force: :cascade do |t| t.string "title" t.string "rating" @@ -40,6 +40,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_26_182250) do t.string "password_digest" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.boolean "admin", default: false end add_foreign_key "reviews", "movies"