Add user admin attribute
This commit is contained in:
		
							
								
								
									
										5
									
								
								db/migrate/20250322071308_add_admin_to_user.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								db/migrate/20250322071308_add_admin_to_user.rb
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
class AddAdminToUser < ActiveRecord::Migration[8.0]
 | 
			
		||||
  def change
 | 
			
		||||
    add_column :users, :admin, :boolean, null: false, default: false
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										3
									
								
								db/schema.rb
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										3
									
								
								db/schema.rb
									
									
									
										generated
									
									
									
								
							@@ -10,7 +10,7 @@
 | 
			
		||||
#
 | 
			
		||||
# It's strongly recommended that you check this file into your version control system.
 | 
			
		||||
 | 
			
		||||
ActiveRecord::Schema[8.0].define(version: 2025_03_20_093759) do
 | 
			
		||||
ActiveRecord::Schema[8.0].define(version: 2025_03_22_071308) do
 | 
			
		||||
  create_table "active_storage_attachments", force: :cascade do |t|
 | 
			
		||||
    t.string "name", null: false
 | 
			
		||||
    t.string "record_type", null: false
 | 
			
		||||
@@ -94,6 +94,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_03_20_093759) do
 | 
			
		||||
    t.datetime "created_at", null: false
 | 
			
		||||
    t.datetime "updated_at", null: false
 | 
			
		||||
    t.string "username"
 | 
			
		||||
    t.boolean "admin", default: false, null: false
 | 
			
		||||
    t.index ["email_address"], name: "index_users_on_email_address", unique: true
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user