Skip to content

Commit 42288c5

Browse files
authored
Add idempotency key for addons table (#1403)
1 parent ffe404b commit 42288c5

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
-- +goose Up
2+
-- +goose StatementBegin
3+
ALTER TABLE public.addons ADD COLUMN idempotency_key text;
4+
CREATE UNIQUE INDEX addons_idempotency_key_uidx
5+
ON public.addons(idempotency_key) WHERE idempotency_key IS NOT NULL;
6+
-- +goose StatementEnd
7+
8+
-- +goose Down
9+
-- +goose StatementBegin
10+
DROP INDEX addons_idempotency_key_uidx;
11+
ALTER TABLE public.addons DROP COLUMN idempotency_key;
12+
-- +goose StatementEnd

packages/db/queries/models.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)