From 972e4e41319d5c25594b9a1e825afcff40162a41 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 5 Jan 2021 18:02:25 +0000 Subject: [PATCH] --- server/AyaNova/util/AySchema.cs | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/server/AyaNova/util/AySchema.cs b/server/AyaNova/util/AySchema.cs index 7bbb3d34..2e2c58e8 100644 --- a/server/AyaNova/util/AySchema.cs +++ b/server/AyaNova/util/AySchema.cs @@ -681,35 +681,13 @@ $BODY$ LANGUAGE PLPGSQL STABLE"); //LOANUNIT await ExecQueryAsync("CREATE TABLE aloanunit (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 " + - "serial text, workorderitemloanid null references aworkorderitemloan(id), " + + "serial text, workorderitemloanid null references aworkorderitemloan(id), unitid null references aunit(id), defaultrate integer not null, " + "ratehour decimal(19,4) not null, ratehalfday decimal(19,4) not null, rateday decimal(19,4) not null, rateweek decimal(19,4) not null, ratemonth decimal(19,4) not null, rateyear decimal(19,4) not null " + - ")"); await ExecQueryAsync("CREATE UNIQUE INDEX aloanunit_name_id_idx ON aloanunit (id, name);"); await ExecQueryAsync("CREATE INDEX aloanunit_tags ON aloanunit using GIN(tags)"); - // public string Serial { get; set; } - // public long? WorkOrderItemLoanId { get; set; }//deliberately named for efcore relationship magic - - // [Required] - // public decimal RateHour { get; set; } - // [Required] - // public decimal RateHalfDay { get; set; } - // [Required] - // public decimal RateDay { get; set; } - // [Required] - // public decimal RateWeek { get; set; } - // [Required] - // public decimal RateMonth { get; set; } - // [Required] - // public decimal RateYear { get; set; } - - // [Required] - // public LoanUnitRateUnit DefaultRate { get; set; } - // public long? UnitId { get; set; }//deliberately named for efcore relationship magic Shadow unit - - //PART await ExecQueryAsync("CREATE TABLE apart (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text not null unique, active bool, " +