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

Schema versioning #12

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

ChrisRx
Copy link
Member

@ChrisRx ChrisRx commented Aug 9, 2019

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 ChrisRx added enhancement New feature or request e2db wip Work-in-progress labels Aug 9, 2019
@ChrisRx ChrisRx requested a review from ktravis August 9, 2019 15:02
@ChrisRx ChrisRx force-pushed the feature/11/e2db-schema-versions branch from d60b52a to 038671c Compare August 9, 2019 15:16
@ChrisRx ChrisRx changed the title [WIP] Schema versioning Schema versioning Oct 22, 2020
@ChrisRx ChrisRx marked this pull request as draft October 22, 2020 15:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e2db enhancement New feature or request wip Work-in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

schema versioning
1 participant