-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extend payment_requests with paidNonce, status, modifietAt
- Loading branch information
1 parent
b8cc99f
commit 644dc09
Showing
8 changed files
with
207 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
internal/db/schema/migrations/2025012711184901_add_status_to_payment_request.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
ALTER TABLE payment_requests | ||
ADD COLUMN modified_at timestamptz; | ||
|
||
ALTER TABLE payment_requests | ||
ADD COLUMN status TEXT; | ||
|
||
ALTER TABLE payment_requests | ||
ADD COLUMN paid_nonce numeric NULL; | ||
|
||
UPDATE payment_requests set modified_at = created_at where modified_at is null; | ||
UPDATE payment_requests set status = 'not-verified' where status is null; | ||
|
||
ALTER TABLE payment_requests | ||
ALTER COLUMN modified_at SET NOT NULL; | ||
|
||
ALTER TABLE payment_requests | ||
ALTER COLUMN status SET NOT NULL; | ||
-- +goose StatementEnd | ||
|
||
-- +goose Down | ||
-- +goose StatementBegin | ||
ALTER TABLE payment_requests | ||
DROP COLUMN modified_at; | ||
|
||
ALTER TABLE payment_requests | ||
DROP COLUMN status; | ||
|
||
ALTER TABLE payment_requests | ||
DROP COLUMN paid_nonce; | ||
-- +goose StatementEnd |
Oops, something went wrong.