Files
overwatch/simulation/deploy/supabase/migrate.sql
thebadking 388d2fb1d0
Some checks failed
AERIS-10 CI / Python Lint + Tests (push) Has been cancelled
AERIS-10 CI / MCU Firmware Tests (push) Has been cancelled
AERIS-10 CI / FPGA Regression (push) Has been cancelled
AERIS-10 CI / Cross-Layer Contract Tests (push) Has been cancelled
Record the Overwatch tree as a new root.
The operator scenario uses ten radars on a 12 km ring, a 9 km loiter, a blast that waits for the closest point, and up to three launches when a closer drone is on the line.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-21 07:36:33 +00:00

14 lines
649 B
PL/PgSQL

\set ON_ERROR_STOP on
BEGIN;
CREATE SCHEMA IF NOT EXISTS app_migrations;
CREATE TABLE IF NOT EXISTS app_migrations.applied (name text PRIMARY KEY, applied_at timestamptz NOT NULL DEFAULT now());
SELECT NOT EXISTS (SELECT 1 FROM app_migrations.applied WHERE name = '20260930000000_simulation_runs') AS needs_migration \gset
\if :needs_migration
\ir /app-migrations/20260930000000_simulation_runs.sql
GRANT USAGE ON SCHEMA public TO authenticated;
GRANT SELECT, INSERT, DELETE ON public.simulation_runs TO authenticated;
INSERT INTO app_migrations.applied(name) VALUES ('20260930000000_simulation_runs');
\endif
NOTIFY pgrst, 'reload schema';
COMMIT;