From 2cf173a663fd7317e3fffcba146b3b5915e25a67 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 13 Jan 2021 01:12:30 +0000 Subject: [PATCH] --- server/AyaNova/models/Part.cs | 4 ++-- server/AyaNova/util/AySchema.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/AyaNova/models/Part.cs b/server/AyaNova/models/Part.cs index d259c722..939bd017 100644 --- a/server/AyaNova/models/Part.cs +++ b/server/AyaNova/models/Part.cs @@ -36,7 +36,7 @@ namespace AyaNova.Models public decimal Cost { get; set; } [Required] public decimal Retail { get; set; } - public long? UnitOfMeasureId { get; set; } + public string UnitOfMeasure { get; set; } public string UPC { get; set; } [Required] public bool TrackSerialNumber { get; set; } @@ -80,7 +80,7 @@ CREATE TABLE [dbo].[APART]( [AALTERNATIVEWHOLESALERNUMBER] [nvarchar](255) NULL, [ACOST] [decimal](19, 5) NULL, [ARETAIL] [decimal](19, 5) NULL, - [AUNITOFMEASUREID] [uniqueidentifier] NULL, + [AUNITOFMEASUREID] [uniqueidentifier] NULL,//convert to text and store inside the part instead of in another table to reduce join dependencies [APARTASSEMBLYID] [uniqueidentifier] NULL,//DROP, Migrate into new partassemblyitem [AUPC] [nvarchar](255) NULL, [ATRACKSERIALNUMBER] [bit] NOT NULL, diff --git a/server/AyaNova/util/AySchema.cs b/server/AyaNova/util/AySchema.cs index 9be93803..04a9d301 100644 --- a/server/AyaNova/util/AySchema.cs +++ b/server/AyaNova/util/AySchema.cs @@ -684,7 +684,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE"); "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 " + + "cost decimal(19,4) not null, retail decimal(19,4) not null, unitofmeasure text, 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)");