Skip to content

Commit 7020f36

Browse files
committed
db/sqlc: kvstores schemas & queries
In this commit, we define the schemas and queries that are needed to implement the firewalldb's KVStores in SQL.
1 parent 846dc68 commit 7020f36

File tree

7 files changed

+550
-1
lines changed

7 files changed

+550
-1
lines changed

db/migrations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const (
2222
// daemon.
2323
//
2424
// NOTE: This MUST be updated when a new migration is added.
25-
LatestMigrationVersion = 2
25+
LatestMigrationVersion = 3
2626
)
2727

2828
// MigrationTarget is a functional option that can be passed to applyMigrations

db/sqlc/kvstores.sql.go

Lines changed: 345 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-- Drop indexes first.
2+
DROP INDEX IF EXISTS kvstores_lookup_idx;
3+
4+
-- Drop tables in reverse dependency order.
5+
DROP TABLE IF EXISTS kvstores;
6+
DROP TABLE IF EXISTS features;
7+
DROP TABLE IF EXISTS rules;

0 commit comments

Comments
 (0)