Migrate to Postgresql for better network handling. Add more user functionality.
This commit is contained in:
22
db/migrate/001_create_projects.rb
Normal file
22
db/migrate/001_create_projects.rb
Normal file
@@ -0,0 +1,22 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CreateProjects < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
create_table :projects, force: :cascade do |t|
|
||||
t.string :name, null: false, index: true
|
||||
t.string :slug, null: false, index: { unique: true }
|
||||
t.string :public_key, null: false, index: { unique: true }
|
||||
t.boolean :enabled, default: true, null: false, index: true
|
||||
|
||||
# WAF settings
|
||||
t.integer :rate_limit_threshold, default: 100, null: false
|
||||
t.text :settings, default: "{}", null: false
|
||||
t.text :custom_rules, default: "{}", null: false
|
||||
|
||||
# Analytics
|
||||
t.integer :blocked_ip_count, default: 0, null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user