fix(scaffold): autogenerate initial migration on smpy new (#135) - #146
Merged
antosubash merged 1 commit intoMay 13, 2026
Merged
antosubash merged 1 commit into
antosubash merged 1 commit into
Conversation
Deploying simple-module-python with
|
| Latest commit: |
c92b58f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ef3fac9e.simple-module-python.pages.dev |
| Branch Preview URL: | https://feature-chore-fresh-scaffold.simple-module-python.pages.dev |
Owner
Author
|
Not auto-merged in this batch — this PR is in a CI on the head commit is green (12/12), so once rebased onto current Generated by Claude Code |
antosubash
force-pushed
the
feature/chore-fresh-scaffold-empty-migrations-migration-4zx5u
branch
from
May 13, 2026 16:14
dc6bb44 to
7e55d5a
Compare
… on a fresh `smpy new` (#135) `host/migrations/versions/` ships with only `.gitkeep`, so the post-install `alembic upgrade head` was a silent no-op and the app booted against an empty schema. Run `alembic revision --autogenerate -m "initial schema"` first (skipping if a revision already exists), and invoke alembic from `host/` instead of the workspace root. Also updates the `--no-install` next-steps and workspace README quickstart to point at `make migration msg="initial schema"` + `make migrate`.
antosubash
force-pushed
the
feature/chore-fresh-scaffold-empty-migrations-migration-4zx5u
branch
from
May 13, 2026 16:20
7e55d5a to
c92b58f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
host/migrations/versions/ships with only.gitkeep, so the post-installalembic upgrade headwas a silent no-op and the freshly-scaffolded app booted against an empty schema (closes Fresh scaffold has empty migrations dir —make migrateis a no-op untilmake migration msg=...is run #135).smpy newnow runsalembic revision --autogenerate -m "initial schema"beforealembic upgrade head, skipping if a revision already exists. Alembic is also invoked fromhost/(previously from the workspace root, where there's noalembic.ini).--no-installnext-steps and the workspace README quickstart now point atmake migration msg="initial schema"+make migrate.create_app_projectnow returns the host dir sonew.pydoesn't recompute the flat-vs-workspace ternary, and the["uv", "run", "alembic", ...]command is hoisted into a single_ALEMBICconstant.Test plan
uv run pytest framework/cli/tests/— 108 passeduv run ruff check framework/cli/andruff format --check framework/cli/clean--no-installnext-steps wording,_bootstrap_initial_migrationruns autogenerate when only.gitkeepis present, and skips when a revision file already existssmpy new myapp --yes && cd myapp && sqlite3 host/app.db ".tables"shows the bundled modules' tables instead of justalembic_version