Skip to content

Commit

Permalink
Merge pull request #3 from gobuffalo/fix-disabletimestaps
Browse files Browse the repository at this point in the history
Fixes `t.DisableTimestamps` and enables `create_table("foo", {timestamps: false})` fixes #2
  • Loading branch information
markbates authored Jun 29, 2018
2 parents 54d48e0 + b6b11ce commit 25461ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions migrations/20160808213308_setup_tests.up.fizz
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down
3 changes: 2 additions & 1 deletion tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 25461ee

Please sign in to comment.