Add admin attribute to users

This commit is contained in:
Maikel Linke
2025-01-07 12:45:40 +11:00
parent 31c717349f
commit 698d1daa57
2 changed files with 9 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
# frozen_string_literal: true
# We'll replace our only role "admin" with a simple flag.
class AddAdminToSpreeUsers < ActiveRecord::Migration[7.0]
def change
add_column :spree_users, :admin, :boolean, default: false, null: false
end
end

View File

@@ -945,6 +945,7 @@ ActiveRecord::Schema[7.0].define(version: 2025_01_13_055412) do
t.string "provider"
t.string "uid"
t.datetime "terms_of_service_accepted_at"
t.boolean "admin", default: false, null: false
t.index ["confirmation_token"], name: "index_spree_users_on_confirmation_token", unique: true
t.index ["email"], name: "email_idx_unique", unique: true
t.index ["persistence_token"], name: "index_users_on_persistence_token"