Skip to content
This repository has been archived by the owner on Nov 20, 2021. It is now read-only.

schema versioning #11

Open
ChrisRx opened this issue Aug 5, 2019 · 0 comments · May be fixed by #12
Open

schema versioning #11

ChrisRx opened this issue Aug 5, 2019 · 0 comments · May be fixed by #12
Labels
e2db enhancement New feature or request

Comments

@ChrisRx
Copy link
Member

ChrisRx commented Aug 5, 2019

There should be a way to version defined schema. This will be important to allow for writing automated migration scripts. This could be something added to the primary key of the struct:

type MyStruct struct {
    ID int `e2db:"id,v=1"`
}

where implicitly it is schema version 0, or it could be implicit to the types themselves based upon a deterministic hash of the fields. In either case the key structure will have to change to allow for the schema version to be inserted into the key (probably just after the table name).

@ChrisRx ChrisRx added enhancement New feature or request e2db labels Aug 5, 2019
@ChrisRx ChrisRx linked a pull request Aug 9, 2019 that will close this issue
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e2db enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant