This commit is contained in:
2021-01-13 01:06:09 +00:00
parent 66873d8d43
commit e0d8aaf8c7
2 changed files with 7 additions and 4 deletions

View File

@@ -15,7 +15,6 @@ namespace AyaNova.Models
public long Id { get; set; }
public uint Concurrency { get; set; }
public string Name { get; set; }
[Required]
public bool Active { get; set; }

View File

@@ -347,7 +347,7 @@ BEGIN
when 17 then aytable = 'afileattachment'; aynamecolumn ='displayfilename';
when 18 then aytable = 'adatalistview';
when 19 then aytable = 'aformcustom'; aynamecolumn = 'formkey';
when 20 then aytable = 'apart';
when 20 then aytable = 'apart'; aynamecolumn ='partnumber';
when 21 then aytable = 'apm'; aynamecolumn ='serial';
when 22 then aytable = 'apmitem';
when 23 then aytable = 'apmtemplate';
@@ -680,8 +680,12 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
await ExecQueryAsync("ALTER TABLE auser add FOREIGN KEY (headofficeid) REFERENCES aheadoffice(id)");
//PART
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 TABLE apart (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text, active bool not null, " +
"notes text, wiki text, customfields text, tags varchar(255) ARRAY, " +
"partnumber text not null unique, popupnotes text, manufacturerid bigint REFERENCES avendor, manufacturernumber text, "+
"wholesalerid bigint REFERENCES avendor, wholesalernumber text, alternativewholesalerid bigint REFERENCES avendor, alternativewholesalernumber text, " +
"cost decimal(19,4) not null, retail decimal(19,4) not null, unitofmeasureid REFERENCES aunitofmeasure, upc text, trackserialnumber bool not null " +
" )");
await ExecQueryAsync("CREATE UNIQUE INDEX apart_name_id_idx ON apart (id, name);");
await ExecQueryAsync("CREATE INDEX apart_tags ON apart using GIN(tags)");