Skip to content

Remove the superseded manual SQL update scripts 01-22 #7702

Open

Description

@aglinxinyuan

Task Summary

sql/updates/01.sql through 22.sql are outside the applied migration chain. Nothing in the repository can execute them.

The chain is defined solely by sql/changelog.xml, whose live changesets are 23-37. Its only mention of a lower number is sql/updates/1.sql, inside an <!-- example changeSet --> comment — and no such file exists, since the real ones are zero-padded.

Neither bootstrap path needs them:

fresh DB      -> sql/texera_ddl.sql (one-time bootstrap, post-migration shape)
existing DB   -> already past changeset 23, so 01-22 ran long ago

Every runner was checked against that:

Runner Why 01-22 are unreachable
sql/docker-compose.yml liquibase runs --changeLogFile=changelog.xml; the updates/*.sql loop only sed-normalizes files into /tmp and still matches 23-37
bin/local-dev/main.sh parse_changelog_changesets skips XML comments and applies only referenced changesets
bin/single-node/docker-compose.yml mounts sql/ into /docker-entrypoint-initdb.d, and the postgres entrypoint does not recurse into updates/
.github/workflows/automatic-email-notif-on-ddl-change.yml diffs with --diff-filter=A (added only), so deletions are inert
bin/local-dev/tests/test_local_dev_sh.sh test 28 asserts only that changelog-referenced files exist

One caveat worth a maintainer's call. These are the historical manual-upgrade scripts operators were emailed about. An operator still running a pre-changeset-23 database would lose the only in-tree copy — recoverable from git history, but no longer browsable in the tree. If that matters, a short sql/updates/README.md breadcrumb pointing at the history would cover it.

Removing them is a pure deletion with no behaviour change: −989 lines.

Task Type

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions