Skip to content

Commit

Permalink
postgres: update table to use identity instead of serial (#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfridman authored Aug 27, 2024
1 parent 3802b0a commit 3d6ee77
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/dialect/dialectquery/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ var _ Querier = (*Postgres)(nil)

func (p *Postgres) CreateTable(tableName string) string {
q := `CREATE TABLE %s (
id serial NOT NULL,
id integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
version_id bigint NOT NULL,
is_applied boolean NOT NULL,
tstamp timestamp NULL default now(),
PRIMARY KEY(id)
tstamp timestamp NOT NULL DEFAULT now()
)`
return fmt.Sprintf(q, tableName)
}
Expand Down

0 comments on commit 3d6ee77

Please sign in to comment.