Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement database migrations #5

Open
keybits opened this issue Jun 15, 2023 · 1 comment
Open

Implement database migrations #5

keybits opened this issue Jun 15, 2023 · 1 comment
Assignees

Comments

@keybits
Copy link
Member

keybits commented Jun 15, 2023

Currently fly-start.sh and schema.sql naively create tables in the DB if they don't already exist.

This allows for creating a new db on first launch and preserving content when redeploying.

But we don't have a way to do migration if we alter the db structure.

Current preferred approach is what's documented here https://david.rothlis.net/declarative-schema-migration-for-sqlite/ and in this HN discussion: https://news.ycombinator.com/item?id=31249823)

keybits added a commit that referenced this issue Jun 15, 2023
It's now an issue here: #5
@keybits keybits self-assigned this Jun 23, 2023
@keybits
Copy link
Member Author

keybits commented Jan 30, 2024

Another option is to use Simon Willison's SQLite utils: https://sqlite-utils.datasette.io/en/stable/cli.html#transforming-tables

He's also planning a more robust migration tool: https://twitter.com/simonw/status/1752079842538123488

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

No branches or pull requests

1 participant