From f56ed394ec54215e6ef48abc6e8c565fb6ddce15 Mon Sep 17 00:00:00 2001 From: Stanislas Michalak Date: Sat, 25 Apr 2020 09:09:32 +0200 Subject: [PATCH 1/2] Fix go mod --- go.mod | 1 - soda/cmd/version.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 60b70574..b4c3ef33 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/gobuffalo/pop/v5 go 1.13 require ( - github.com/cockroachdb/cockroach-go v0.0.0-20190925194419-606b3d062051 github.com/fatih/color v1.9.0 github.com/go-sql-driver/mysql v1.5.0 github.com/gobuffalo/attrs v0.1.0 diff --git a/soda/cmd/version.go b/soda/cmd/version.go index 1b11751f..119bcf37 100644 --- a/soda/cmd/version.go +++ b/soda/cmd/version.go @@ -1,4 +1,4 @@ package cmd // Version defines the current Pop version. -const Version = "v5.1.0" +const Version = "v5.1.1" From 4910a9957154526c8e27b6dc430528c25c0aad8e Mon Sep 17 00:00:00 2001 From: Atakan Yenel Date: Tue, 19 May 2020 19:14:03 +0200 Subject: [PATCH 2/2] map time.time to timestamp --- genny/fizz/ctable/create_table.go | 2 +- genny/fizz/ctable/create_table_test.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/genny/fizz/ctable/create_table.go b/genny/fizz/ctable/create_table.go index a2e8fd98..019b3151 100644 --- a/genny/fizz/ctable/create_table.go +++ b/genny/fizz/ctable/create_table.go @@ -72,7 +72,7 @@ func fizzColType(s string) string { switch strings.ToLower(s) { case "int": return "integer" - case "time", "datetime": + case "time.time", "time", "datetime": return "timestamp" case "uuid.uuid", "uuid": return "uuid" diff --git a/genny/fizz/ctable/create_table_test.go b/genny/fizz/ctable/create_table_test.go index eef6adf5..b101ce57 100644 --- a/genny/fizz/ctable/create_table_test.go +++ b/genny/fizz/ctable/create_table_test.go @@ -11,7 +11,7 @@ import ( func Test_New(t *testing.T) { r := require.New(t) - ats, err := attrs.ParseArgs("id:uuid", "created_at:timestamp", "updated_at:timestamp", "name", "description:text", "age:int", "bar:nulls.String") + ats, err := attrs.ParseArgs("id:uuid", "created_at:timestamp", "updated_at:timestamp", "name", "description:text", "age:int", "bar:nulls.String", "started_at:time.Time", "finished_at:nulls.Time") r.NoError(err) cases := []struct { @@ -51,6 +51,8 @@ func Test_New(t *testing.T) { t.Column("description", "text", {}) t.Column("age", "integer", {}) t.Column("bar", "string", {null: true}) + t.Column("started_at", "timestamp", {}) + t.Column("finished_at", "timestamp", {null: true}) t.Timestamps() }`, },