dawarich/db/migrate/20241226202204_add_database_users_constraints.rb
2024-12-26 21:34:10 +01:00

8 lines
311 B
Ruby

# frozen_string_literal: true
class AddDatabaseUsersConstraints < ActiveRecord::Migration[8.0]
def change
add_check_constraint :users, 'email IS NOT NULL', name: 'users_email_null', validate: false
add_check_constraint :users, 'admin IS NOT NULL', name: 'users_admin_null', validate: false
end
end