Add sort to characteristics

This commit is contained in:
Matthew Dillon 2015-06-11 15:16:56 -08:00
parent 35bf1e363c
commit 0a75837292
2 changed files with 2 additions and 0 deletions

View file

@ -20,6 +20,7 @@ type CharacteristicBase struct {
Id int64 `json:"id,omitempty"`
CharacteristicName string `db:"characteristic_name" json:"characteristicName"`
CharacteristicTypeId int64 `db:"characteristic_type_id" json:"-"`
Sort NullInt64 `db:"sort" json:"sort"`
CreatedAt time.Time `db:"created_at" json:"createdAt"`
UpdatedAt time.Time `db:"updated_at" json:"updatedAt"`
DeletedAt NullTime `db:"deleted_at" json:"deletedAt"`

View file

@ -5,6 +5,7 @@ CREATE TABLE characteristics (
id BIGSERIAL NOT NULL,
characteristic_name TEXT NOT NULL,
characteristic_type_id BIGINT NOT NULL,
sort BIGINT NULL,
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
updated_at TIMESTAMP WITH TIME ZONE NOT NULL,