This commit is contained in:
2020-12-11 21:11:49 +00:00
parent 292b337cb4
commit 4218ed6b7f
9 changed files with 92 additions and 132 deletions

View File

@@ -481,6 +481,13 @@ $BODY$;
{
LogUpdateMessage(log);
//MEMO
await ExecQueryAsync("CREATE TABLE amemo (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text not null, " +
"notes text, wiki text, customfields text, tags varchar(255) ARRAY, " +
"viewed bool default false, replied bool default false, fromid bigint not null REFERENCES auser(id), toid bigint not null REFERENCES auser(id) )");
await ExecQueryAsync("CREATE INDEX aproject_tags ON aproject using GIN(tags)");
//CUSTOMER
await ExecQueryAsync("CREATE TABLE acustomer (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text not null unique, active bool, " +
"notes text, wiki text, customfields text, tags varchar(255) ARRAY, " +
@@ -508,7 +515,7 @@ $BODY$;
//HEADOFFICE
await ExecQueryAsync("CREATE TABLE aheadoffice (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text not null unique, active bool, " +
"notes text, wiki text, customfields text, tags varchar(255) ARRAY," +
"notes text, wiki text, customfields text, tags varchar(255) ARRAY," +
"webaddress text, accountnumber text, usesbanking bool, contractexpires timestamp null, contractid bigint null references acontract(id), " +
"phone1 text, phone2 text, phone3 text, phone4 text, phone5 text, emailaddress text, " +
"postaddress text, postcity text, postregion text, postcountry text, postcode text, address text, city text, region text, country text, latitude decimal(8,6), longitude decimal(9,6)" +