This commit is contained in:
2021-01-13 00:56:40 +00:00
parent fb2fc7adf2
commit 66873d8d43
2 changed files with 66 additions and 7 deletions

View File

@@ -686,16 +686,14 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
await ExecQueryAsync("CREATE INDEX apart_tags ON apart using GIN(tags)");
//PARTASSEMBLY
await ExecQueryAsync("CREATE TABLE apart (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text not null unique, active bool not null, " +
await ExecQueryAsync("CREATE TABLE apartassembly (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text not null unique, active bool not null, " +
"notes text, wiki text, customfields text, tags varchar(255) ARRAY )");
await ExecQueryAsync("CREATE UNIQUE INDEX apart_name_id_idx ON apart (id, name);");
await ExecQueryAsync("CREATE INDEX apart_tags ON apart using GIN(tags)");
await ExecQueryAsync("CREATE UNIQUE INDEX apart_name_id_idx ON apartassembly (id, name);");
await ExecQueryAsync("CREATE INDEX apart_tags ON apartassembly using GIN(tags)");
//PARTASSEMBLYITEM
await ExecQueryAsync("CREATE TABLE apartassemblyitem (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, partassemblyid bigint not null REFERENCES apartassembly, " +
"key text not null, display text not null)");
"partid bigint not null REFERENCES apart)");
//PROJECT
await ExecQueryAsync("CREATE TABLE aproject (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text not null unique, active bool not null, " +