Skip to content

Commit

Permalink
Fix migration script v1
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaBernstein committed Oct 28, 2021
1 parent 1b80b70 commit dec6e25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/migrations/v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func v1CreateTransactionsTable(db *sql.Tx) {
sqlStatement := `
CREATE TABLE "bot::transaction" (
"id" SERIAL PRIMARY KEY,
"tgChatId" NUMERIC REFERENCES "auth::user" ("tgChatId") NOT NULL
"tgChatId" NUMERIC REFERENCES "auth::user" ("tgChatId") NOT NULL,
"created" TIMESTAMP NOT NULL DEFAULT NOW(),
"value" TEXT,
"archived" BOOLEAN DEFAULT FALSE NOT NULL
Expand All @@ -63,7 +63,7 @@ func v1CreateValueCache(db *sql.Tx) {
sqlStatement := `
CREATE TABLE "bot::cache" (
"id" SERIAL PRIMARY KEY,
"tgChatId" NUMERIC REFERENCES "auth::user" ("tgChatId") NOT NULL
"tgChatId" NUMERIC REFERENCES "auth::user" ("tgChatId") NOT NULL,
"lastUsed" TIMESTAMP NOT NULL DEFAULT NOW(),
"type" TEXT,
"value" TEXT
Expand Down

0 comments on commit dec6e25

Please sign in to comment.