From f7df5f8b10031b8065a3ed04df40f437a00292db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Sat, 29 Aug 2026 12:42:24 +0100 Subject: [PATCH] the plugin tells the site what its databases are called MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- api/databases.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/api/databases.ts b/api/databases.ts index 4ac41be..fa8e9eb 100644 --- a/api/databases.ts +++ b/api/databases.ts @@ -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',