mirror of https://github.com/coder/coder.git
chore: Enable comments for database dump / models (#3661)
This commit is contained in:
parent
253e6cbffa
commit
7a71180ae6
2
Makefile
2
Makefile
|
@ -56,7 +56,7 @@ build: site/out/index.html $(shell find . -not -path './vendor/*' -type f -name
|
|||
.PHONY: build
|
||||
|
||||
# Runs migrations to output a dump of the database.
|
||||
coderd/database/dump.sql: $(wildcard coderd/database/migrations/*.sql)
|
||||
coderd/database/dump.sql: coderd/database/dump/main.go $(wildcard coderd/database/migrations/*.sql)
|
||||
go run coderd/database/dump/main.go
|
||||
|
||||
# Generates Go code for querying the database.
|
||||
|
|
|
@ -138,6 +138,8 @@ CREATE TABLE licenses (
|
|||
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.';
|
||||
|
||||
CREATE SEQUENCE licenses_id_seq
|
||||
AS integer
|
||||
START WITH 1
|
||||
|
|
|
@ -41,7 +41,6 @@ func main() {
|
|||
connection,
|
||||
"--no-privileges",
|
||||
"--no-owner",
|
||||
"--no-comments",
|
||||
|
||||
// We never want to manually generate
|
||||
// queries executing against this table.
|
||||
|
|
|
@ -360,7 +360,8 @@ type License struct {
|
|||
ID int32 `db:"id" json:"id"`
|
||||
UploadedAt time.Time `db:"uploaded_at" json:"uploaded_at"`
|
||||
JWT string `db:"jwt" json:"jwt"`
|
||||
Exp time.Time `db:"exp" json:"exp"`
|
||||
// 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.
|
||||
Exp time.Time `db:"exp" json:"exp"`
|
||||
}
|
||||
|
||||
type Organization struct {
|
||||
|
|
Loading…
Reference in New Issue