the plugin tells the site what its databases are called

Both names, on every push, whichever target it is. The site's guard checks that
the two environments expect DIFFERENT databases, so it needs both to do that at
all — and passing only the one being pushed to would leave the other falling
back to the name the repository shipped with, which is a comparison against
something nobody configured.

This makes the plugin the authority on what the site's databases are called,
which is the whole point of the change on the other side: the site stopped
hardcoding them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-29 12:42:24 +01:00
co-authored by Claude Opus 5
parent 0971764fca
commit f7df5f8b10
+12 -2
View File
@@ -190,9 +190,19 @@ export async function pushSchema(
env: {
...process.env,
FOFOS_ENV: target,
// Both, because which one their guard reads depends on FOFOS_ENV and setting only one would
// work for a single target by accident.
...(target === 'production' ? { POSTGRES_URL: url.toString() } : { POSTGRES_URL_DEV: url.toString() }),
/*
BOTH expected names, whichever target this is.
Their guard checks that the two environments expect different databases, so it needs both to do
that at all — and passing only the one being pushed to would leave the other falling back to the
name the repository shipped with, which is a comparison against something nobody configured.
These are the names stored here, which makes this plugin the authority on what the site's
databases are called. That is the point of the change: the site stopped hardcoding them.
*/
...(status.production.name ? { FOFOS_DB_PRODUCTION: status.production.name } : {}),
...(status.development.name ? { FOFOS_DB_DEVELOPMENT: status.development.name } : {}),
},
stdout: 'pipe',
stderr: 'pipe',