e2d icon indicating copy to clipboard operation
e2d copied to clipboard

Schema versioning

Open ChrisRx opened this issue 6 years ago • 0 comments

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)

ChrisRx avatar Aug 09 '19 15:08 ChrisRx