This commit is contained in:
@@ -385,7 +385,7 @@ namespace AyaNova.Util
|
||||
//WORKORDER
|
||||
await ExecQueryAsync("CREATE TABLE aworkorder (id BIGSERIAL PRIMARY KEY, serial bigint not null, active bool, " +
|
||||
"notes text NULL, wiki text null, customfields text NULL, tags varchar(255) ARRAY NULL)");
|
||||
await ExecQueryAsync("CREATE INDEX aworkorder_number_id_idx ON aworkorder (id, serial);");
|
||||
await ExecQueryAsync("CREATE INDEX aworkorder_serial_id_idx ON aworkorder (id, serial);");//is this necessary or fruitful?
|
||||
await ExecQueryAsync("CREATE INDEX aworkorder_tags ON aworkorder using GIN(tags)");
|
||||
|
||||
//WORKORDERITEM
|
||||
@@ -407,13 +407,13 @@ namespace AyaNova.Util
|
||||
await ExecQueryAsync("CREATE INDEX aworkordertemplateitem_tags ON aworkordertemplateitem using GIN(tags)");
|
||||
|
||||
//QUOTE
|
||||
await ExecQueryAsync("CREATE TABLE aquote (id BIGSERIAL PRIMARY KEY, name varchar(255) not null unique, active bool, " +
|
||||
await ExecQueryAsync("CREATE TABLE aquote (id BIGSERIAL PRIMARY KEY, serial bigint not null, active bool, " +
|
||||
"notes text NULL, wiki text null, customfields text NULL, tags varchar(255) ARRAY NULL)");
|
||||
await ExecQueryAsync("CREATE UNIQUE INDEX aquote_name_id_idx ON aquote (id, name);");
|
||||
await ExecQueryAsync("CREATE UNIQUE INDEX aquote_serial_id_idx ON aquote (id, serial);");//is this necessary or fruitful?
|
||||
await ExecQueryAsync("CREATE INDEX aquote_tags ON aquote using GIN(tags)");
|
||||
|
||||
//QUOTEITEM
|
||||
await ExecQueryAsync("CREATE TABLE aquoteitem (id BIGSERIAL PRIMARY KEY, name varchar(255) not null unique, active bool, " +
|
||||
await ExecQueryAsync("CREATE TABLE aquoteitem (id BIGSERIAL PRIMARY KEY, quoteid bigint not null REFERENCES aquote (id), name varchar(255) not null unique, active bool, " +
|
||||
"notes text NULL, wiki text null, customfields text NULL, tags varchar(255) ARRAY NULL)");
|
||||
await ExecQueryAsync("CREATE UNIQUE INDEX aquoteitem_name_id_idx ON aquoteitem (id, name);");
|
||||
await ExecQueryAsync("CREATE INDEX aquoteitem_tags ON aquoteitem using GIN(tags)");
|
||||
@@ -431,13 +431,13 @@ namespace AyaNova.Util
|
||||
await ExecQueryAsync("CREATE INDEX aquotetemplateitem_tags ON aquotetemplateitem using GIN(tags)");
|
||||
|
||||
//PM
|
||||
await ExecQueryAsync("CREATE TABLE apm (id BIGSERIAL PRIMARY KEY, name varchar(255) not null unique, active bool, " +
|
||||
await ExecQueryAsync("CREATE TABLE apm (id BIGSERIAL PRIMARY KEY, serial bigint not null, active bool, " +
|
||||
"notes text NULL, wiki text null, customfields text NULL, tags varchar(255) ARRAY NULL)");
|
||||
await ExecQueryAsync("CREATE UNIQUE INDEX apm_name_id_idx ON apm (id, name);");
|
||||
await ExecQueryAsync("CREATE UNIQUE INDEX apm_serial_id_idx ON apm (id, serial);");//is this necessary or fruitful?
|
||||
await ExecQueryAsync("CREATE INDEX apm_tags ON apm using GIN(tags)");
|
||||
|
||||
//PMITEM
|
||||
await ExecQueryAsync("CREATE TABLE apmitem (id BIGSERIAL PRIMARY KEY, name varchar(255) not null unique, active bool, " +
|
||||
await ExecQueryAsync("CREATE TABLE apmitem (id BIGSERIAL PRIMARY KEY, pmid bigint not null REFERENCES apm (id), name varchar(255) not null unique, active bool, " +
|
||||
"notes text NULL, wiki text null, customfields text NULL, tags varchar(255) ARRAY NULL)");
|
||||
await ExecQueryAsync("CREATE UNIQUE INDEX apmitem_name_id_idx ON apmitem (id, name);");
|
||||
await ExecQueryAsync("CREATE INDEX apmitem_tags ON apmitem using GIN(tags)");
|
||||
|
||||
Reference in New Issue
Block a user