mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-02 21:57:17 +00:00
Add admin attribute to users
This commit is contained in:
8
db/migrate/20250107013958_add_admin_to_spree_users.rb
Normal file
8
db/migrate/20250107013958_add_admin_to_spree_users.rb
Normal 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
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user