feat: store coder_workspace_tags in the database (#13294)

This commit is contained in:
Marcin Tojek
2024-05-20 15:30:19 +02:00
committed by GitHub
parent 45b45f1107
commit b8b80fe6d2
30 changed files with 1052 additions and 397 deletions

View File

@ -0,0 +1 @@
DROP TABLE IF EXISTS template_version_workspace_tags;

View File

@ -0,0 +1,6 @@
CREATE TABLE IF NOT EXISTS template_version_workspace_tags (
template_version_id uuid not null references template_versions (id) on delete cascade,
key text not null,
value text not null,
unique (template_version_id, key)
);

View File

@ -267,6 +267,7 @@ func TestMigrateUpWithFixtures(t *testing.T) {
"workspace_build_parameters",
"template_version_variables",
"dbcrypt_keys", // having zero rows is a valid state for this table
"template_version_workspace_tags",
}
s := &tableStats{s: make(map[string]int)}