Class: CreateIpBlocklists
- Inherits:
-
Object
- Object
- CreateIpBlocklists
- Defined in:
- lib/generators/ruby_cms/templates/db/migrate/20251121161828_create_ip_blocklists.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/generators/ruby_cms/templates/db/migrate/20251121161828_create_ip_blocklists.rb', line 2 def change create_table :ip_blocklists, if_not_exists: true do |t| t.string :ip_address, null: false t.text :note t. end add_index :ip_blocklists, :ip_address, unique: true, if_not_exists: true end |