From b6b11cec3319716a9c8af8555480470cd443841b Mon Sep 17 00:00:00 2001 From: Mark Bates Date: Fri, 29 Jun 2018 13:46:33 -0400 Subject: [PATCH] Fixes `t.DisableTimestamps` and enables `create_table("foo", {timestamps: false})` fixes #2 --- migrations/20160808213308_setup_tests.up.fizz | 1 + tables.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/migrations/20160808213308_setup_tests.up.fizz b/migrations/20160808213308_setup_tests.up.fizz index 947e87b0..aff9db9f 100644 --- a/migrations/20160808213308_setup_tests.up.fizz +++ b/migrations/20160808213308_setup_tests.up.fizz @@ -10,6 +10,7 @@ create_table("users") { create_table("good_friends") { t.Column("first_name", "string") t.Column("last_name", "string") + t.DisableTimestamps() } create_table("validatable_cars") { diff --git a/tables.go b/tables.go index 9517b83c..6e882e2b 100644 --- a/tables.go +++ b/tables.go @@ -90,10 +90,11 @@ func (t *Table) HasColumns(args ...string) bool { return true } -func (f fizzer) CreateTable(name string, help plush.HelperContext) error { +func (f fizzer) CreateTable(name string, opts map[string]interface{}, help plush.HelperContext) error { t := Table{ Name: name, Columns: []Column{}, + Options: opts, } if help.HasBlock() {