dev fix, ip controls
This commit is contained in:
@@ -267,5 +267,21 @@ def run_migrations():
|
||||
con.execute("CREATE INDEX IF NOT EXISTS idx_alert_events_created ON alert_events(created_at)")
|
||||
con.execute("CREATE INDEX IF NOT EXISTS idx_alert_events_job_id ON alert_events(job_id)")
|
||||
|
||||
con.execute(
|
||||
"""
|
||||
CREATE TABLE IF NOT EXISTS app_ip_access_rules (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
app_id TEXT NOT NULL,
|
||||
ip_cidr TEXT NOT NULL,
|
||||
methods TEXT NOT NULL DEFAULT 'WRITE',
|
||||
description TEXT,
|
||||
is_enabled INTEGER NOT NULL DEFAULT 1,
|
||||
created_at TEXT DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TEXT DEFAULT CURRENT_TIMESTAMP
|
||||
)
|
||||
"""
|
||||
)
|
||||
con.execute("CREATE INDEX IF NOT EXISTS idx_app_ip_access_rules_app_id ON app_ip_access_rules(app_id)")
|
||||
|
||||
con.commit()
|
||||
con.close()
|
||||
|
||||
Reference in New Issue
Block a user