dev fix, ip controls

This commit is contained in:
JiriUhlir
2026-06-15 11:08:31 +02:00
parent bf4796d153
commit a948324b2e
5 changed files with 310 additions and 1 deletions
+16
View File
@@ -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()