mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39:50 +00:00
This allows users to generate a 30 day free license during setup to test out Enterprise features.
28 lines
361 B
SQL
28 lines
361 B
SQL
-- name: InsertLicense :one
|
|
INSERT INTO
|
|
licenses (
|
|
uploaded_at,
|
|
jwt,
|
|
exp,
|
|
uuid
|
|
)
|
|
VALUES
|
|
($1, $2, $3, $4) RETURNING *;
|
|
|
|
-- name: GetLicenses :many
|
|
SELECT *
|
|
FROM licenses
|
|
ORDER BY (id);
|
|
|
|
-- name: GetUnexpiredLicenses :many
|
|
SELECT *
|
|
FROM licenses
|
|
WHERE exp > NOW()
|
|
ORDER BY (id);
|
|
|
|
-- name: DeleteLicense :one
|
|
DELETE
|
|
FROM licenses
|
|
WHERE id = $1
|
|
RETURNING id;
|