From e0d8aaf8c7d7a2ff047679523336ae69aaae61e6 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 13 Jan 2021 01:06:09 +0000 Subject: [PATCH] --- server/AyaNova/models/Part.cs | 1 - server/AyaNova/util/AySchema.cs | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/server/AyaNova/models/Part.cs b/server/AyaNova/models/Part.cs index 871f33f9..d259c722 100644 --- a/server/AyaNova/models/Part.cs +++ b/server/AyaNova/models/Part.cs @@ -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; } diff --git a/server/AyaNova/util/AySchema.cs b/server/AyaNova/util/AySchema.cs index 268cd479..9be93803 100644 --- a/server/AyaNova/util/AySchema.cs +++ b/server/AyaNova/util/AySchema.cs @@ -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)");