Skip to content

Feat/export metaschema#17

Open
Zetazzz wants to merge 6 commits into
mainfrom
feat/export-metaschema
Open

Feat/export metaschema#17
Zetazzz wants to merge 6 commits into
mainfrom
feat/export-metaschema

Conversation

@Zetazzz
Copy link
Copy Markdown

@Zetazzz Zetazzz commented Feb 27, 2026

No description provided.

Comment thread functions/export-metaschema/handler.ts Outdated

// Discover database_id and name from metaschema
const dbsResult = await pgPool.query(
'SELECT id, name FROM metaschema_public.database'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use a WHERE clause

Comment thread functions/export-metaschema/handler.ts Outdated
}

const targetRow = params.databaseName
? dbsResult.rows.find((r: any) => r.name === params.databaseName)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do this in the above SQL ^^^^

Comment thread functions/export-metaschema/handler.ts Outdated

// Check that sql_actions exist for this database before exporting
const actionsResult = await pgPool.query(
'SELECT count(*)::int AS cnt FROM db_migrate.sql_actions WHERE database_id = $1',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need to do this? shouldn't we just call export and not touch sql?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe I'm misunderstanding

@Zetazzz Zetazzz force-pushed the feat/export-metaschema branch from 1752f5c to e278bb9 Compare March 4, 2026 02:45
@Anmol1696 Anmol1696 force-pushed the feat/export-metaschema branch from 09d945f to d97698d Compare May 12, 2026 05:37
@Anmol1696
Copy link
Copy Markdown
Contributor

Heads-up: repository history was rewritten on 2026-05-12 to scrub leaked secrets (Postgres/pgAdmin default passwords, an AWS access key ID, generated k8s/manifests/interweb-*.yaml files) from every commit. Every branch on origin was force-pushed with new commit SHAs.

This PR shows "DIRTY" / merge-conflict status because main has a cleanup commit and this branch is based on pre-rewrite main. To clear it:

git fetch --all --prune
git checkout <this-branch>
git reset --hard origin/<this-branch>    # your local branch tip moved too — pick up the rewritten version
git rebase origin/main                    # rebase onto rewritten main
# resolve conflicts (usually trivial — mostly secret-placeholder + the 4 deleted interweb-*.yaml files)
git push --force-with-lease

Or merge instead of rebase if the branch is shared with others:

git merge origin/main
git push

Notes:

  • The secrets that leaked were all either dead (rotated AWS key) or were defaults that have since been rotated/replaced; no active credential is exposed.
  • Old commit SHAs are still accessible by direct URL on GitHub for ~90 days (can be expedited via GitHub Support if needed).
  • See k8s/SECRET-EXPOSURE-AUDIT.md on main for the full incident audit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants