From d11691d4cdc5152b831f1dd35ab0f1b9664d8c7d Mon Sep 17 00:00:00 2001 From: kristinaspring Date: Wed, 20 Mar 2019 11:02:20 -0700 Subject: [PATCH] Change times to bigints (#20) --- CHANGELOG.md | 6 +++++- db/db.go | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d706871..e842660 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [v0.2.5] + - Modified record schema in `db` package + ## [v0.2.4] - Modified record schema in `db` package @@ -56,7 +59,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Initial creation - Created `db` and `xvault` package -[Unreleased]: https://github.com/Comcast/codex/compare/v0.2.4...HEAD +[Unreleased]: https://github.com/Comcast/codex/compare/v0.2.5...HEAD +[v0.2.5]: https://github.com/Comcast/codex/compare/v0.2.4...v0.2.5 [v0.2.4]: https://github.com/Comcast/codex/compare/v0.2.3...v0.2.4 [v0.2.3]: https://github.com/Comcast/codex/compare/v0.2.2...v0.2.3 [v0.2.2]: https://github.com/Comcast/codex/compare/v0.2.1...v0.2.2 diff --git a/db/db.go b/db/db.go index 84ae009..f35c75e 100644 --- a/db/db.go +++ b/db/db.go @@ -129,8 +129,8 @@ type Record struct { ID int `json:"id" gorm:"type:bigint;AUTO_INCREMENT"` Type int `json:"type"` DeviceID string `json:"deviceid" gorm:"not null;index"` - BirthDate time.Time `json:"birthdate" gorm:"type:timestamp;not null;index"` - DeathDate time.Time `json:"deathdate" gorm:"type:timestamp;not null;index"` + BirthDate time.Time `json:"birthdate" gorm:"type:bigint;not null;index"` + DeathDate time.Time `json:"deathdate" gorm:"type:bigint;not null;index"` Data []byte `json:"data" gorm:"not null"` }