Migrate to Postgresql for better network handling. Add more user functionality.

This commit is contained in:
Dan Milne
2025-11-06 14:08:39 +11:00
parent 85252a1a07
commit fc567f0b91
69 changed files with 4266 additions and 952 deletions

View 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