mirror of
https://github.com/allaunthefox/SilverSight.git
synced 2026-07-31 01:25:21 +00:00
fix: GoTrue one_time_tokens pre-creation in startup script
- neon-startup.py: pre-creates one_time_tokens table to work around GoTrue migration ordering bug - Postgres podman lock contention resolved via system reset - Infrastructure recovery documented
This commit is contained in:
parent
29b0582b12
commit
b880a32c83
1 changed files with 3 additions and 0 deletions
|
|
@ -94,6 +94,9 @@ log(f" ✅ {len(files)} migrations attempted (batched)")
|
|||
all_versions = "','".join(f.split("_")[0] for f in files)
|
||||
run(f'{PSQL} -d appflowy -c "INSERT INTO auth.schema_migrations (version) SELECT unnest(array[\'{all_versions}\']) ON CONFLICT DO NOTHING"', timeout=30)
|
||||
|
||||
# Pre-create tables that GoTrue migrations fail to create due to ordering bugs
|
||||
run(f'{PSQL} -d appflowy -c "CREATE TABLE IF NOT EXISTS auth.one_time_tokens (id uuid PRIMARY KEY, user_id uuid, token_type text NOT NULL, token_hash text NOT NULL, expires_at timestamptz NOT NULL, created_at timestamptz NOT NULL DEFAULT now())"', timeout=10)
|
||||
|
||||
# Sync to public schema for GoTrue binary
|
||||
run(f'{PSQL} -d appflowy -c "DROP TABLE IF EXISTS public.schema_migrations; CREATE TABLE public.schema_migrations AS SELECT * FROM auth.schema_migrations"', timeout=10)
|
||||
log(" Migration tracking synced")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue