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

Add schema versioning to the database #62

Open
ketiltrout opened this issue Nov 22, 2018 · 0 comments
Open

Add schema versioning to the database #62

ketiltrout opened this issue Nov 22, 2018 · 0 comments
Labels
db For database changes (schema migrations) feature

Comments

@ketiltrout
Copy link
Member

ketiltrout commented Nov 22, 2018

Even if we didn't support multiple schema versions in a single alpenhorn version, we could at least have an out-of-date alpenhorn complain and exit rather than screw up the database.

The proposal here: chime-experiment/Infrastructure#21:

I'd also recommend adding a table for schema versioning, say schema_version (Or schemaversion since we seem to like smashing words together. Is that what peewee wants?). Given there are multiple extensions in alpenhorn2, maybe have two columns:

   component CHAR(60) NOT NULL PRIMARY KEY
   version INT NOT NULL

and then have at least one column for the alpenhorn2 base schema and maybe one for the CHIME extensions:

component version
alpenhorn 1
chime 1

Does it need a peewee model? I suppose, if we're using peewee's migrations per #54 )

@ketiltrout ketiltrout added feature db For database changes (schema migrations) labels Nov 22, 2018
@ketiltrout ketiltrout added this to the alpenhorn2 milestone Nov 22, 2018
@ketiltrout ketiltrout removed this from the alpenhorn2 milestone Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
db For database changes (schema migrations) feature
Projects
None yet
Development

No branches or pull requests

1 participant