Skip to content

Always run migrations#28

Merged
hawkinslabdev merged 6 commits into
hawkinslabdev:mainfrom
mvarrieur:export-refactor
May 12, 2026
Merged

Always run migrations#28
hawkinslabdev merged 6 commits into
hawkinslabdev:mainfrom
mvarrieur:export-refactor

Conversation

@mvarrieur
Copy link
Copy Markdown
Contributor

@mvarrieur mvarrieur commented May 6, 2026

Summary

  • Runs database migrations inside server.js before importing the SvelteKit handler or listening for requests.
  • Refactors migrate.js into a reusable runMigrations() helper while preserving direct node migrate.js usage.
  • Simplifies Docker startup to node server.js, relying on the server’s migration gate instead of duplicating migration logic in the Docker command.
  • Documents that production/preview startup applies migrations before serving and exits loudly if migration fails.

@hawkinslabdev
Copy link
Copy Markdown
Owner

That's a nice addition; and I've known at least 3 people to rely on the package right now (one of which I know personally) - so a higher contract number doesn´t seem necessary. Go ahead, feel free to clean up the export. I do however would like to keep the README.md clean, would you be able to remove the contract reference over there?

Nice addition overall @mvarrieur!

@mvarrieur mvarrieur changed the title Export refactor Always run migrations May 11, 2026
@mvarrieur
Copy link
Copy Markdown
Contributor Author

@hawkinslabdev updated to just contain the enforced migrations changes!

@hawkinslabdev hawkinslabdev merged commit 38065b4 into hawkinslabdev:main May 12, 2026
1 check passed
@hawkinslabdev
Copy link
Copy Markdown
Owner

Appreciate the contribution again; merged!

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.

2 participants