Skip to content

Commit

Permalink
Remove ID column enforcement
Browse files Browse the repository at this point in the history
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
  • Loading branch information
stanislas-m committed Aug 9, 2018
1 parent a210f78 commit b4a74d5
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit b4a74d5

Please sign in to comment.