Skip to content

Commit bbb0fab

Browse files
authored
chore: merge database gen scripts (#8073)
* chore: merge database gen scripts * Fix type params gen * Merge enum into dbgen
1 parent f3b2009 commit bbb0fab

File tree

9 files changed

+551
-835
lines changed

9 files changed

+551
-835
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ coderd/database/dump.sql: coderd/database/gen/dump/main.go $(wildcard coderd/dat
486486
go run ./coderd/database/gen/dump/main.go
487487

488488
# Generates Go code for querying the database.
489-
coderd/database/querier.go: coderd/database/sqlc.yaml coderd/database/dump.sql $(wildcard coderd/database/queries/*.sql) coderd/database/gen/enum/main.go coderd/database/gen/fake/main.go
489+
coderd/database/querier.go: coderd/database/sqlc.yaml coderd/database/dump.sql $(wildcard coderd/database/queries/*.sql)
490490
./coderd/database/generate.sh
491491

492492

coderd/database/db.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ import (
1818
"golang.org/x/xerrors"
1919
)
2020

21+
// Well-known lock IDs for lock functions in the database. These should not
22+
// change. If locks are deprecated, they should be kept to avoid reusing the
23+
// same ID.
24+
const (
25+
LockIDDeploymentSetup = iota + 1
26+
)
27+
2128
// Store contains all queryable database functions.
2229
// It extends the generated interface to add transaction support.
2330
type Store interface {

coderd/database/gen/authz/main.go

Lines changed: 0 additions & 199 deletions
This file was deleted.

coderd/database/gen/enum/main.go

Lines changed: 0 additions & 120 deletions
This file was deleted.

0 commit comments

Comments
 (0)