This commit is contained in:
2021-01-13 00:42:47 +00:00
parent f3a619f16d
commit fb2fc7adf2
9 changed files with 121 additions and 1 deletions

View File

@@ -392,6 +392,7 @@ BEGIN
when 62 then aytable = 'aservicerate';
when 63 then aytable = 'atravelrate';
when 64 then aytable = 'ataxcode';
when 65 then aytable = 'apartassembly';
else
RETURN format('??PUBLIC.AYGETNAME-UNKNOWN_TYPE:%S',ayobjecttype);-- This should not happen unless dev forgot to update this
end case;
@@ -684,6 +685,18 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
await ExecQueryAsync("CREATE UNIQUE INDEX apart_name_id_idx ON apart (id, name);");
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, " +
"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)");
//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)");
//PROJECT
await ExecQueryAsync("CREATE TABLE aproject (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, " +