-
Notifications
You must be signed in to change notification settings - Fork 929
POST license API endpoint #3570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b9d5915
ddb7332
a2189e0
0d698e2
b3288e4
0fbe130
a590d75
4d6dfcb
ba9167e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- Valid licenses don't fit into old format, so delete all data | ||
DELETE FROM licenses; | ||
ALTER TABLE licenses DROP COLUMN jwt; | ||
ALTER TABLE licenses RENAME COLUMN uploaded_at to created_at; | ||
ALTER TABLE licenses ADD COLUMN license jsonb NOT NULL; | ||
ALTER TABLE licenses DROP COLUMN exp; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
-- No valid licenses should exist, but to be sure, drop all rows | ||
DELETE FROM licenses; | ||
ALTER TABLE licenses DROP COLUMN license; | ||
ALTER TABLE licenses RENAME COLUMN created_at to uploaded_at; | ||
ALTER TABLE licenses ADD COLUMN jwt text NOT NULL; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In |
||
-- prevent adding the same license more than once | ||
ALTER TABLE licenses ADD CONSTRAINT licenses_jwt_key UNIQUE (jwt); | ||
ALTER TABLE licenses ADD COLUMN exp timestamp with time zone NOT NULL; | ||
COMMENT ON COLUMN licenses.exp IS 'exp tracks the claim of the same name in the JWT, and we include it here so that we can easily query for licenses that have not yet expired.'; | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.