We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6bd2396 commit 0400406Copy full SHA for 0400406
postgres/schema.go
@@ -30,6 +30,12 @@ func (c Column) GoType() string {
30
return "int"
31
case "pg_catalog.timestamp":
32
return "time.Time"
33
+ case "pg_catalog.varchar":
34
+ if c.NotNull {
35
+ return "string"
36
+ } else {
37
+ return "sql.NullString"
38
+ }
39
default:
40
return "interface{}"
41
}
testdata/ondeck/schema/0002_venue.sql
@@ -1,9 +1,9 @@
1
CREATE TABLE venues (
2
id SERIAL primary key,
3
dropped text,
4
- slug text not null,
5
- name text not null,
6
- city text references city(slug),
7
- spotify_playlist text not null,
+ slug text not null,
+ name varchar(255) not null,
+ city text references city(slug),
+ spotify_playlist varchar not null,
8
songkick_id text
9
)
0 commit comments