mirror of
https://github.com/Cccc-owo/CheckInApp.git
synced 2026-06-17 05:56:29 +00:00
feat(backend): add automatic DB migrations
Add a lightweight migration runner with schema_migrations tracking, run pending migrations during backend startup before the scheduler, and keep a manual backend-migrate entrypoint. The change also moves the existing lockout and task-thread-ID schema steps into shared migration modules, updates docs, and archives the OpenSpec change.
This commit is contained in:
@@ -56,6 +56,11 @@ class BackendManagerUvTests(unittest.TestCase):
|
||||
self.assertEqual(cmd[1:3], ["run", "python"])
|
||||
self.assertEqual(cmd[3:5], [str(main.REPO_ROOT / "main.py"), "backend"])
|
||||
|
||||
def test_backend_migrate_command_is_registered(self) -> None:
|
||||
args = main.build_parser().parse_args(["backend-migrate"])
|
||||
|
||||
self.assertIs(args.func, main.run_backend_migrations)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user