13 lines
581 B
SQL
13 lines
581 B
SQL
-- ============================================================
|
|
-- post-boot — runs after all migrations have been applied.
|
|
-- Grants INSERT/UPDATE to authenticator on user-facing tables.
|
|
-- Seeds initial admin user (telegram_id 298181113).
|
|
-- ============================================================
|
|
|
|
GRANT INSERT, UPDATE ON search_queries TO authenticator;
|
|
GRANT INSERT, UPDATE ON notifications TO authenticator;
|
|
|
|
INSERT INTO users (telegram_id, username, first_name, is_admin, is_active)
|
|
VALUES (298181113, NULL, 'Admin', true, true)
|
|
ON CONFLICT (telegram_id) DO NOTHING;
|