e2d
e2d copied to clipboard
Schema versioning
This fixes #11 and will add the ability to specify versions for schema (per-object) via the struct field tags. The default version when no version is specified is currently 0. Specifying versions starts with 1 and is added to the primary key tag:
type MySchema struct {
ID int `e2db:"id,v=1"`
}
TODO
- [ ] Add version to all composite keys
- [ ] Model comparison functions (aka model diff)
- [ ] Unit tests demonstrating all possible types of schema changes (e.g. Add, New Index, etc)