aglinxinyuan opened a new pull request, #7703:
URL: https://github.com/apache/texera/pull/7703
### What changes were proposed in this PR?
Deletes `sql/updates/01.sql` through `22.sql`, which sit outside the applied
migration chain — nothing in the repository can execute them. Pure deletion, no
behaviour change: **−989 lines**.
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 the deleted files:
```
fresh DB -> sql/texera_ddl.sql (one-time bootstrap, already the
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 its glob
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`; 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 |
> Reviewer note — one judgement call worth flagging. 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; it
stays recoverable from git history, but is no longer browsable in the tree.
Happy to add a short `sql/updates/README.md` breadcrumb pointing at the history
if that is preferred — I kept this PR a pure deletion.
### Any related issues, documentation, discussions?
Closes #7702
### How was this PR tested?
Existing tests only — this PR removes files that no runner executes.
From the repo root:
- `bash bin/local-dev/tests/test_local_dev_sh.sh` — 114 passed, including
the two that guard this exact contract:
- `changelog parser: 15 changesets, commented example skipped`
- `changelog: every referenced sql/updates file exists`
Its 3 failures (`worktree pointer`, `listen_pid_for_port`, `install cmd:
java via brew`) are pre-existing on this Windows machine — confirmed identical
with the deletion stashed, and caused by the absence of `lsof`/`ss`/`brew`
rather than by this change.
Verification, re-runnable by a reviewer:
```
grep -oE 'sql/updates/[0-9]+\.sql' sql/changelog.xml | sort -V #
1(commented) + 23..37 only
for n in $(seq -w 1 22); do git grep -l "$n\.sql" -- . ':!sql/updates'; done
# no hits
```
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]