From 0a75837292f900d3f038844c8fff3f8c6b3b9559 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Thu, 11 Jun 2015 15:16:56 -0800 Subject: [PATCH] Add sort to characteristics --- characteristics.go | 1 + migrations/00006_AddCharacteristics_up.sql | 1 + 2 files changed, 2 insertions(+) diff --git a/characteristics.go b/characteristics.go index efa2608..5a7d7b3 100644 --- a/characteristics.go +++ b/characteristics.go @@ -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"` diff --git a/migrations/00006_AddCharacteristics_up.sql b/migrations/00006_AddCharacteristics_up.sql index 86802cb..1c369e8 100644 --- a/migrations/00006_AddCharacteristics_up.sql +++ b/migrations/00006_AddCharacteristics_up.sql @@ -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,