From b4a74d5ff48c247fd193e1e9167f191e0b0c8123 Mon Sep 17 00:00:00 2001 From: Stanislas Michalak Date: Thu, 9 Aug 2018 19:38:03 +0200 Subject: [PATCH] Remove ID column enforcement Fixes first part of #5. When using the model generator in pop this enforcement is already done: https://github.com/gobuffalo/pop/blob/v4.6.3/soda/cmd/generate/model.go#L121 --- tables.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tables.go b/tables.go index a2976516..f6043183 100644 --- a/tables.go +++ b/tables.go @@ -108,18 +108,6 @@ func (f fizzer) CreateTable(name string, opts map[string]interface{}, help plush } } - var foundPrimary bool - for _, c := range t.Columns { - if c.Primary { - foundPrimary = true - break - } - } - - if !foundPrimary { - t.Columns = append([]Column{INT_ID_COL}, t.Columns...) - } - if enabled, exists := t.Options["timestamps"]; !exists || enabled == true { t.Timestamps() }