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"