diff --git a/.vscode/settings.json b/.vscode/settings.json index 9ab110e..b0a34ee 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -71,7 +71,8 @@ "prodlabels", "prolink", "Skelly", - "trycatch" + "trycatch", + "whse" ], "gitea.token": "8456def90e1c651a761a8711763d6ef225d6b2db", "gitea.instanceURL": "https://git.tuffraid.net", diff --git a/backend/datamart/datamart.controller.ts b/backend/datamart/datamart.controller.ts index 1fc7823..954b488 100644 --- a/backend/datamart/datamart.controller.ts +++ b/backend/datamart/datamart.controller.ts @@ -13,6 +13,10 @@ * * when a criteria is password over we will handle it by counting how many were passed up to 3 then deal with each one respectively */ + +import { and, between, inArray, notInArray } from "drizzle-orm"; +import { db } from "../db/db.controller.js"; +import { invHistoricalData } from "../db/schema/historicalInv.schema.js"; import { prodQuery } from "../prodSql/prodSqlQuery.controller.js"; import { type SqlQuery, @@ -29,8 +33,68 @@ type Data = { howManyOptionsRequired?: number; }; +const lstDbRun = async (data: Data) => { + if (data.options) { + if (data.name === "psiInventory") { + const ids = data.options.articles.split(",").map((id: any) => id.trim()); + const whse = data.options.whseToInclude + ? data.options.whseToInclude + .split(",") + .map((w: any) => w.trim()) + .filter(Boolean) + : []; + + const locations = data.options.exludeLanes + ? data.options.exludeLanes + .split(",") + .map((l: any) => l.trim()) + .filter(Boolean) + : []; + + const conditions = [ + inArray(invHistoricalData.article, ids), + between( + invHistoricalData.histDate, + data.options.startDate, + data.options.endDate, + ), + ]; + + // only add the warehouse condition if there are any whse values + if (whse.length > 0) { + conditions.push(inArray(invHistoricalData.whseId, whse)); + } + + // locations we dont want in the system + if (locations.length > 0) { + conditions.push(notInArray(invHistoricalData.location, locations)); + } + + return await db + .select() + .from(invHistoricalData) + .where(and(...conditions)); + } + } + return []; +}; export const runDatamartQuery = async (data: Data) => { // search the query db for the query by name + const considerLstDBRuns = ["psiInventory"]; + + if (considerLstDBRuns.includes(data.name)) { + const lstDB = await lstDbRun(data); + + return returnFunc({ + success: true, + level: "info", + module: "datamart", + subModule: "lstDBrn", + message: `Data for: ${data.name}`, + data: lstDB, + notify: false, + }); + } const sqlQuery = sqlQuerySelector(`datamart.${data.name}`) as SqlQuery; const getDataMartInfo = datamartData.filter((x) => x.endpoint === data.name); @@ -103,13 +167,26 @@ export const runDatamartQuery = async (data: Data) => { `${data.options.includeRunningNumbers ? `,l.RunningNumber` : `--,l.RunningNumber`}`, ) .replaceAll( - "--,l.MachineLocation,l.MachineName,l.ProductionLotRunningNumber", - `${data.options.lots ? `,l.MachineLocation,l.MachineName,l.ProductionLotRunningNumber` : `--,l.MachineLocation,l.MachineName,l.ProductionLotRunningNumber`}`, + "--,l.MachineLocation,l.MachineName,l.ProductionLotRunningNumber as lot", + `${data.options.lots ? `,l.MachineLocation,l.MachineName,l.ProductionLotRunningNumber as lot` : `--,l.MachineLocation,l.MachineName,l.ProductionLotRunningNumber as lot`}`, ) .replaceAll( "--,l.WarehouseDescription,l.LaneDescription", `${data.options.locations ? `,l.WarehouseDescription,l.LaneDescription` : `--,l.WarehouseDescription,l.LaneDescription`}`, ); + + // adding in a test for historical check. + if (data.options.historical) { + datamartQuery = datamartQuery + .replace( + "--,l.ProductionLotRunningNumber as lot,l.warehousehumanreadableid as warehouseId,l.WarehouseDescription as warehouseDescription,l.lanehumanreadableid as locationId,l.lanedescription as laneDescription", + ",l.ProductionLotRunningNumber as lot,l.warehousehumanreadableid as warehouseId,l.WarehouseDescription as warehouseDescription,l.lanehumanreadableid as locationId,l.lanedescription as laneDescription", + ) + .replace( + "--,l.ProductionLotRunningNumber,l.warehousehumanreadableid,l.WarehouseDescription,l.lanehumanreadableid,l.lanedescription", + ",l.ProductionLotRunningNumber,l.warehousehumanreadableid,l.WarehouseDescription,l.lanehumanreadableid,l.lanedescription", + ); + } break; case "fakeEDIUpdate": datamartQuery = datamartQuery.replace( @@ -118,6 +195,58 @@ export const runDatamartQuery = async (data: Data) => { ); break; + case "forecast": + datamartQuery = datamartQuery.replace( + "where DeliveryAddressHumanReadableId in ([customers])", + data.options.customers + ? `where DeliveryAddressHumanReadableId in (${data.options.customers})` + : "--where DeliveryAddressHumanReadableId in ([customers])", + ); + + break; + case "activeArticles2": + datamartQuery = datamartQuery.replace( + "and a.HumanReadableId in ([articles])", + data.options.articles + ? `and a.HumanReadableId in (${data.options.articles})` + : "--and a.HumanReadableId in ([articles])", + ); + + break; + + case "psiDeliveryData": + datamartQuery = datamartQuery + .replace("[startDate]", `${data.options.startDate}`) + .replace("[endDate]", `${data.options.endDate}`) + .replace( + "and IdArtikelVarianten in ([articles])", + data.options.articles + ? `and IdArtikelVarianten in (${data.options.articles})` + : "--and IdArtikelVarianten in ([articles])", + ); + break; + case "productionData": + datamartQuery = datamartQuery + .replace("[startDate]", `${data.options.startDate}`) + .replace("[endDate]", `${data.options.endDate}`) + .replace( + "and ArticleHumanReadableId in ([articles])", + data.options.articles + ? `and ArticleHumanReadableId in (${data.options.articles})` + : "--and ArticleHumanReadableId in ([articles])", + ); + break; + case "psiPlanningData": + datamartQuery = datamartQuery + .replace("[startDate]", `${data.options.startDate}`) + .replace("[endDate]", `${data.options.endDate}`) + .replace( + "and p.IdArtikelvarianten in ([articles])", + data.options.articles + ? `and p.IdArtikelvarianten in (${data.options.articles})` + : "--and p.IdArtikelvarianten in ([articles])", + ); + break; default: return returnFunc({ success: false, diff --git a/backend/datamart/datamartData.utlis.ts b/backend/datamart/datamartData.utlis.ts index 0e09009..5d1099d 100644 --- a/backend/datamart/datamartData.utlis.ts +++ b/backend/datamart/datamartData.utlis.ts @@ -49,4 +49,12 @@ export const datamartData = [ description: `Returns all open orders to correct and resubmit via lst demand mgt, leaving blank will get everything putting an address only returns the specified address. \nNOTE: only orders that were created via edi will populate here.`, options: "address", }, + { + name: "Production Data", + endpoint: "productionData", + description: `Returns all production data from the date range with the option to have 1 to many avs to search by.`, + options: "startDate,endDate,articles", + optionsRequired: true, + howManyOptionsRequired: 2, + }, ]; diff --git a/backend/db/schema/historicalInv.schema.ts b/backend/db/schema/historicalInv.schema.ts new file mode 100644 index 0000000..8a761d0 --- /dev/null +++ b/backend/db/schema/historicalInv.schema.ts @@ -0,0 +1,30 @@ +import { date, pgTable, text, timestamp, uuid } from "drizzle-orm/pg-core"; +import { createInsertSchema, createSelectSchema } from "drizzle-zod"; +import type z from "zod"; + +export const invHistoricalData = pgTable("inv_historical_data", { + inv: uuid("id").defaultRandom().primaryKey(), + histDate: date("hist_date").notNull(), // this date should always be yesterday when we post it. + plantToken: text("plant_token"), + article: text("article").notNull(), + articleDescription: text("article_description").notNull(), + materialType: text("material_type"), + total_QTY: text("total_QTY"), + available_QTY: text("available_QTY"), + coa_QTY: text("coa_QTY"), + held_QTY: text("held_QTY"), + consignment_QTY: text("consignment_qty"), + lot_Number: text("lot_number"), + locationId: text("location_id"), + location: text("location"), + whseId: text("whse_id").default(""), + whseName: text("whse_name").default("missing whseName"), + upd_user: text("upd_user").default("lst-system"), + upd_date: timestamp("upd_date").defaultNow(), +}); + +export const invHistoricalDataSchema = createSelectSchema(invHistoricalData); +export const newInvHistoricalDataSchema = createInsertSchema(invHistoricalData); + +export type InvHistoricalData = z.infer; +export type NewInvHistoricalData = z.infer; diff --git a/backend/logistics/logistics.historicalInv.ts b/backend/logistics/logistics.historicalInv.ts new file mode 100644 index 0000000..34c7725 --- /dev/null +++ b/backend/logistics/logistics.historicalInv.ts @@ -0,0 +1,220 @@ +import { format } from "date-fns"; +import { eq, sql } from "drizzle-orm"; +import { runDatamartQuery } from "../datamart/datamart.controller.js"; +import { db } from "../db/db.controller.js"; +import { invHistoricalData } from "../db/schema/historicalInv.schema.js"; +import { prodQuery } from "../prodSql/prodSqlQuery.controller.js"; +import { + type SqlQuery, + sqlQuerySelector, +} from "../prodSql/prodSqlQuerySelector.utils.js"; +import { createCronJob } from "../utils/croner.utils.js"; +import { returnFunc } from "../utils/returnHelper.utils.js"; +import { tryCatch } from "../utils/trycatch.utils.js"; + +type Inventory = { + article: string; + alias: string; + materialType: string; + total_palletQTY: string; + available_QTY: string; + coa_QTY: string; + held_QTY: string; + consignment_qty: string; + lot: string; + locationId: string; + laneDescription: string; + warehouseId: string; + warehouseDescription: string; +}; + +const historicalInvImport = async () => { + const today = new Date(); + const { data, error } = await tryCatch( + db + .select() + .from(invHistoricalData) + .where(eq(invHistoricalData.histDate, format(today, "yyyy-MM-dd"))), + ); + + if (error) { + return returnFunc({ + success: false, + level: "error", + module: "system", + subModule: "query", + message: `Error getting historical inv info`, + data: error as any, + notify: false, + }); + } + + if (data?.length === 0) { + const avSQLQuery = sqlQuerySelector(`datamart.activeArticles`) as SqlQuery; + + if (!avSQLQuery.success) { + return returnFunc({ + success: false, + level: "error", + module: "logistics", + subModule: "inv", + message: `Error getting Article info`, + data: [avSQLQuery.message], + notify: true, + }); + } + + const { data: inv, error: invError } = await tryCatch( + //prodQuery(sqlQuery.query, "Inventory data"), + runDatamartQuery({ name: "inventory", options: { historical: "x" } }), + ); + + const { data: av, error: avError } = (await tryCatch( + runDatamartQuery({ name: "activeArticles", options: {} }), + )) as any; + + if (invError) { + return returnFunc({ + success: false, + level: "error", + module: "logistics", + subModule: "inv", + message: `Error getting inventory info from prod query`, + data: invError as any, + notify: false, + }); + } + + if (avError) { + return returnFunc({ + success: false, + level: "error", + module: "logistics", + subModule: "inv", + message: `Error getting article info from prod query`, + data: invError as any, + notify: false, + }); + } + + // shape the data to go into our table + const plantToken = process.env.PROD_PLANT_TOKEN ?? "test1"; + const importInv = (inv.data ? inv.data : []) as Inventory[]; + const importData = importInv.map((i) => { + return { + histDate: sql`(NOW())::date`, + plantToken: plantToken, + article: i.article, + articleDescription: i.alias, + materialType: + av.data.filter((a: any) => a.article === i.article).length > 0 + ? av.data.filter((a: any) => a.article === i.article)[0] + ?.TypeOfMaterial + : "Item not defined", + total_QTY: i.total_palletQTY ?? "0.00", + available_QTY: i.available_QTY ?? "0.00", + coa_QTY: i.coa_QTY ?? "0.00", + held_QTY: i.held_QTY ?? "0.00", + consignment_QTY: i.consignment_qty ?? "0.00", + lot_Number: i.lot ?? "0", + locationId: i.locationId ?? "0", + location: i.laneDescription ?? "Missing lane", + whseId: i.warehouseId ?? "0", + whseName: i.warehouseDescription ?? "Missing warehouse", + }; + }); + + const { data: dataImport, error: errorImport } = await tryCatch( + db.insert(invHistoricalData).values(importData), + ); + + if (errorImport) { + return returnFunc({ + success: false, + level: "error", + module: "logistics", + subModule: "inv", + message: `Error adding historical data to lst db`, + data: errorImport as any, + notify: true, + }); + } + + if (dataImport) { + return returnFunc({ + success: false, + level: "info", + module: "logistics", + subModule: "inv", + message: `Historical data was added to lst :D`, + data: [], + notify: false, + }); + } + } else { + return returnFunc({ + success: false, + level: "info", + module: "logistics", + subModule: "inv", + message: `Historical Data for: ${format(today, "yyyy-MM-dd")}, is already added and nothing to do.`, + data: [], + notify: false, + }); + } + + return returnFunc({ + success: false, + level: "info", + module: "logistics", + subModule: "inv", + message: `Some weird crazy error just happened and didnt get captured during the historical inv check.`, + data: [], + notify: true, + }); +}; + +export const historicalSchedule = async () => { + // running the history in case my silly ass dose an update around the shift change time lol, this will prevent loss data. it might be off a little but no one cares + historicalInvImport(); + + const sqlQuery = sqlQuerySelector(`shiftChange`) as SqlQuery; + + if (!sqlQuery.success) { + return returnFunc({ + success: false, + level: "error", + module: "logistics", + subModule: "query", + message: `Error getting shiftChange sql file`, + data: [sqlQuery.message], + notify: false, + }); + } + + const { data, error } = await tryCatch( + prodQuery(sqlQuery.query, "Shift Change data"), + ); + + if (error) { + return returnFunc({ + success: false, + level: "error", + module: "logistics", + subModule: "query", + message: `Error getting shiftChange info`, + data: error as any, + notify: false, + }); + } + // shift split + const shiftTimeSplit = data?.data[0]?.shiftChange.split(":"); + + const cronSetup = `0 ${ + shiftTimeSplit?.length > 0 ? `${parseInt(shiftTimeSplit[1])}` : "0" + } ${ + shiftTimeSplit?.length > 0 ? `${parseInt(shiftTimeSplit[0])}` : "7" + } * * *`; + + createCronJob("historicalInv", cronSetup, () => historicalInvImport()); +}; diff --git a/backend/prodSql/queries/datamart.activeArticles.sql b/backend/prodSql/queries/datamart.activeArticles.sql index fb9d23d..13c9eb7 100644 --- a/backend/prodSql/queries/datamart.activeArticles.sql +++ b/backend/prodSql/queries/datamart.activeArticles.sql @@ -1,6 +1,6 @@ use AlplaPROD_test1 -SELECT V_Artikel.IdArtikelvarianten, +SELECT V_Artikel.IdArtikelvarianten as article, V_Artikel.Bezeichnung, V_Artikel.ArtikelvariantenTypBez, V_Artikel.PreisEinheitBez, diff --git a/backend/prodSql/queries/datamart.activeArticles2.sql b/backend/prodSql/queries/datamart.activeArticles2.sql new file mode 100644 index 0000000..62eca2e --- /dev/null +++ b/backend/prodSql/queries/datamart.activeArticles2.sql @@ -0,0 +1,43 @@ +/** +This will be replacing activeArticles once all data is remapped into this query. +make a note in the docs this activeArticles will go stale sooner or later. +**/ +use [test1_AlplaPROD2.0_Read] + +select a.Id, +a.HumanReadableId as av, +a.Alias as alias, +p.LoadingUnitsPerTruck as loadingUnitsPerTruck, +p.LoadingUnitsPerTruck * p.LoadingUnitPieces as qtyPerTruck, +p.LoadingUnitPieces, +case when i.MinQuantity IS NOT NULL then round(cast(i.MinQuantity as float), 2) else 0 end as min, +case when i.MaxQuantity IS NOT NULL then round(cast(i.MaxQuantity as float),2) else 0 end as max +from masterData.Article (nolock) as a + +/* sales price */ +left join +(select * + from (select + id, + PackagingId, + ArticleId, + DefaultCustomer, + ROW_NUMBER() OVER (PARTITION BY ArticleId ORDER BY ValidAfter DESC) AS RowNum + from masterData.SalesPrice (nolock) + where DefaultCustomer = 1) as x + where RowNum = 1 + ) as s +on a.id = s.ArticleId + +/* pkg instructions */ +left join +masterData.PackagingInstruction (nolock) as p +on s.PackagingId = p.id + +/* stock limits */ +left join +masterData.StockLimit (nolock) as i +on a.id = i.ArticleId + +where a.active = 1 +and a.HumanReadableId in ([articles]) \ No newline at end of file diff --git a/backend/prodSql/queries/datamart.forecast.sql b/backend/prodSql/queries/datamart.forecast.sql new file mode 100644 index 0000000..8e56c0d --- /dev/null +++ b/backend/prodSql/queries/datamart.forecast.sql @@ -0,0 +1,8 @@ +SELECT format(RequirementDate, 'yyyy-MM-dd') as requirementDate +,ArticleHumanReadableId +,CustomerArticleNumber +,ArticleDescription +,Quantity +FROM [test1_AlplaPROD2.0_Read].[forecast].[Forecast] +where DeliveryAddressHumanReadableId in ([customers]) +order by RequirementDate \ No newline at end of file diff --git a/backend/prodSql/queries/datamart.inventory.sql b/backend/prodSql/queries/datamart.inventory.sql index 0570b3b..bc963e3 100644 --- a/backend/prodSql/queries/datamart.inventory.sql +++ b/backend/prodSql/queries/datamart.inventory.sql @@ -1,22 +1,32 @@ +use [test1_AlplaPROD2.0_Read] + select -ArticleHumanReadableId as av +ArticleHumanReadableId as article ,ArticleAlias as alias -,round(sum(QuantityLoadingUnits),0) total_pallets -,round(sum(Quantity),0) as total_palletQTY -,round(sum(case when State = 0 then QuantityLoadingUnits else 0 end),0) avalible_Pallets -,round(sum(case when State = 0 then Quantity else 0 end),0) available_QTY -,sum(case when b.HumanReadableId = 864 then QuantityLoadingUnits else 0 end) as coa_Pallets -,sum(case when b.HumanReadableId = 864 then Quantity else 0 end) as coa_QTY -,sum(case when b.HumanReadableId <> 864 then QuantityLoadingUnits else 0 end) as held_Pallets -,sum(case when b.HumanReadableId <> 864 then Quantity else 0 end) as held_QTY +,round(sum(QuantityLoadingUnits),2) total_pallets +,round(sum(Quantity),2) as total_palletQTY +,round(sum(case when State = 0 then QuantityLoadingUnits else 0 end),2) available_Pallets +,round(sum(case when State = 0 then Quantity else 0 end),2) available_QTY +,round(sum(case when b.HumanReadableId = 864 then QuantityLoadingUnits else 0 end),2) as coa_Pallets +,round(sum(case when b.HumanReadableId = 864 then Quantity else 0 end),2) as coa_QTY +,round(sum(case when b.HumanReadableId <> 864 then QuantityLoadingUnits else 0 end),2) as held_Pallets +,round(sum(case when b.HumanReadableId <> 864 then Quantity else 0 end),2) as held_QTY +,round(sum(case when w.type = 7 then QuantityLoadingUnits else 0 end),2) as consignment_Pallets +,round(sum(case when w.type = 7 then Quantity else 0 end),2) as consignment_qty --,l.RunningNumber -/** should be in line **/ ---,l.MachineLocation,l.MachineName,l.ProductionLotRunningNumber -/** should be in line **/ + +/** datamart include lot number **/ +--,l.MachineLocation,l.MachineName,l.ProductionLotRunningNumber as lot + +/** data mart include location data **/ --,l.WarehouseDescription,l.LaneDescription + +/** historical section **/ +--,l.ProductionLotRunningNumber as lot,l.warehousehumanreadableid as warehouseId,l.WarehouseDescription as warehouseDescription,l.lanehumanreadableid as locationId,l.lanedescription as laneDescription + ,articleTypeName -FROM [test1_AlplaPROD2.0_Read].[warehousing].[WarehouseUnit] as l +FROM [warehousing].[WarehouseUnit] as l (nolock) left join ( SELECT [Id] @@ -24,21 +34,31 @@ SELECT [Id] ,d.[Description] ,[DefectGroupId] ,[IsActive] - FROM [test1_AlplaPROD2.0_Read].[blocking].[BlockingDefect] as g + FROM [blocking].[BlockingDefect] as g (nolock) left join [AlplaPROD_test1].dbo.[T_BlockingDefects] as d (nolock) on d.IdGlobalBlockingDefect = g.HumanReadableId ) as b on b.id = l.MainDefectId + +left join +[warehousing].[warehouse] as w (nolock) on +w.id = l.warehouseid + where LaneHumanReadableId not in (20000,21000) group by ArticleHumanReadableId, ArticleAlias, ArticleTypeName --,l.RunningNumber -/** should be in line **/ + +/** datamart include lot number **/ --,l.MachineLocation,l.MachineName,l.ProductionLotRunningNumber -/** should be in line **/ + +/** data mart include location data **/ --,l.WarehouseDescription,l.LaneDescription +/** historical section **/ +--,l.ProductionLotRunningNumber,l.warehousehumanreadableid,l.WarehouseDescription,l.lanehumanreadableid,l.lanedescription + order by ArticleHumanReadableId \ No newline at end of file diff --git a/backend/prodSql/queries/datamart.productionData.sql b/backend/prodSql/queries/datamart.productionData.sql new file mode 100644 index 0000000..c3e1925 --- /dev/null +++ b/backend/prodSql/queries/datamart.productionData.sql @@ -0,0 +1,19 @@ +use [test1_AlplaPROD2.0_Reporting] + +declare @startDate nvarchar(30) = '[startDate]' --'2024-12-30' +declare @endDate nvarchar(30) = '[endDate]' --'2025-08-09' + +select MachineLocation, +ArticleHumanReadableId as article, +sum(Quantity) as Produced, +count(Quantity) as palletsProdued, +FORMAT(convert(date, ProductionDay), 'M/d/yyyy') as ProductionDay, +ProductionLotHumanReadableId as productionLot + +from [reporting_productionControlling].[ScannedUnit] (nolock) + +where convert(date, ProductionDay) between @startDate and @endDate +and ArticleHumanReadableId in ([articles]) +and BookedOut is null + +group by MachineLocation, ArticleHumanReadableId,ProductionDay, ProductionLotHumanReadableId diff --git a/backend/prodSql/queries/datamart.psiDeliveryData.sql b/backend/prodSql/queries/datamart.psiDeliveryData.sql new file mode 100644 index 0000000..b69e0b0 --- /dev/null +++ b/backend/prodSql/queries/datamart.psiDeliveryData.sql @@ -0,0 +1,23 @@ +use AlplaPROD_test1 +/** + +move this over to the delivery date range query once we have the shift data mapped over correctly. + +update the psi stuff on this as well. +**/ +declare @start_date nvarchar(30) = '[startDate]' --'2025-01-01' +declare @end_date nvarchar(30) = '[endDate]' --'2025-08-09' + + +select IdArtikelVarianten, +ArtikelVariantenBez, +sum(Menge) totalDelivered, +case when convert(time, upd_date) between '00:00' and '07:00' then convert(date, upd_date - 1) else convert(date, upd_date) end as ShippingDate + +from dbo.V_LadePlanungenLadeAuftragAbruf (nolock) + +where upd_date between CONVERT(datetime, @start_date + ' 7:00') and CONVERT(datetime, @end_date + ' 7:00') +and IdArtikelVarianten in ([articles]) + +group by IdArtikelVarianten, upd_date, +ArtikelVariantenBez \ No newline at end of file diff --git a/backend/prodSql/queries/datamart.psiPlanningData.sql b/backend/prodSql/queries/datamart.psiPlanningData.sql new file mode 100644 index 0000000..65b5b65 --- /dev/null +++ b/backend/prodSql/queries/datamart.psiPlanningData.sql @@ -0,0 +1,32 @@ + use AlplaPROD_test1 + declare @start_date nvarchar(30) = '[startDate]' --'2025-01-01' + declare @end_date nvarchar(30) = '[endDate]' --'2025-08-09' + /* + articles will need to be passed over as well as the date structure we want to see + */ + + select x.IdArtikelvarianten As Article, + ProduktionAlias as Description, + standort as MachineId, + MaschinenBezeichnung as MachineName, + --MaschZyklus as PlanningCycleTime, + x.IdProdPlanung as LotNumber, + FORMAT(ProdTag, 'MM/dd/yyyy') as ProductionDay, + x.planMenge as TotalPlanned, + ProduktionMenge as QTYPerDay, + round(ProduktionMengeVPK, 2) PalDay, + Status as finished + --MaschStdAuslastung as nee + + from dbo.V_ProdLosProduktionJeProdTag_PLANNING (nolock) as x + + left join + dbo.V_ProdPlanung (nolock) as p on + x.IdProdPlanung = p.IdProdPlanung + + where ProdTag between @start_date and @end_date + and p.IdArtikelvarianten in ([articles]) + --and V_ProdLosProduktionJeProdTag_PLANNING.IdKunde = 10 + --and IdProdPlanung = 18442 + + order by ProdTag desc \ No newline at end of file diff --git a/backend/prodSql/queries/shiftChange.sql b/backend/prodSql/queries/shiftChange.sql new file mode 100644 index 0000000..d12c98d --- /dev/null +++ b/backend/prodSql/queries/shiftChange.sql @@ -0,0 +1,4 @@ +select top(1) convert(varchar(8) , +convert(time,startdate), 108) as shiftChange + from [test1_AlplaPROD2.0_Read].[masterData].[ShiftDefinition] +where teamNumber = 1 diff --git a/backend/server.ts b/backend/server.ts index 8ee2241..28e93ac 100644 --- a/backend/server.ts +++ b/backend/server.ts @@ -6,6 +6,7 @@ import { dbCleanup } from "./db/dbCleanup.controller.js"; import { type Setting, settings } from "./db/schema/settings.schema.js"; import { connectGPSql } from "./gpSql/gpSqlConnection.controller.js"; import { createLogger } from "./logger/logger.controller.js"; +import { historicalSchedule } from "./logistics/logistics.historicalInv.js"; import { startNotifications } from "./notification/notification.controller.js"; import { createNotifications } from "./notification/notifications.master.js"; import { printerSync } from "./ocp/ocp.printer.manage.js"; @@ -64,6 +65,7 @@ const start = async () => { dbCleanup("jobs", 30), ); createCronJob("logsCleanup", "0 15 5 * * *", () => dbCleanup("logs", 120)); + historicalSchedule(); // one shots only needed to run on server startups createNotifications(); diff --git a/backend/utils/croner.utils.ts b/backend/utils/croner.utils.ts index df6b964..21fe7fa 100644 --- a/backend/utils/croner.utils.ts +++ b/backend/utils/croner.utils.ts @@ -3,6 +3,7 @@ import { eq } from "drizzle-orm"; import { db } from "../db/db.controller.js"; import { jobAuditLog } from "../db/schema/auditLog.schema.js"; import { createLogger } from "../logger/logger.controller.js"; +import type { ReturnHelper } from "./returnHelper.utils.js"; // example createJob // createCronJob("test Cron", "*/5 * * * * *", async () => { @@ -45,7 +46,7 @@ const cronStats: Record = {}; export const createCronJob = async ( name: string, schedule: string, // cron string with 8 8 IE: */5 * * * * * every 5th second - task: () => Promise, // what function are we passing over + task: () => Promise, // what function are we passing over source = "unknown", ) => { // get the timezone based on the os timezone set diff --git a/backend/utils/returnHelper.utils.ts b/backend/utils/returnHelper.utils.ts index 339e72b..db967e9 100644 --- a/backend/utils/returnHelper.utils.ts +++ b/backend/utils/returnHelper.utils.ts @@ -1,7 +1,7 @@ import type { Response } from "express"; import { createLogger } from "../logger/logger.controller.js"; -interface Data { +export interface ReturnHelper { success: boolean; module: | "system" @@ -13,31 +13,10 @@ interface Data { | "notification" | "email" | "purchase" - | "tcp"; - subModule: - | "db" - | "labeling" - | "printer" - | "prodSql" - | "query" - | "sendmail" - | "auth" - | "datamart" - | "jobs" - | "apt" - | "settings" - | "get" - | "update" - | "delete" - | "post" - | "notification" - | "delete" - | "printing" - | "gpSql" - | "email" - | "gpChecks" - | "prodEndpoint" - | "create_server"; + | "tcp" + | "logistics"; + subModule: string; + level: "info" | "error" | "debug" | "fatal" | "warn"; message: string; room?: string; @@ -59,7 +38,7 @@ interface Data { * data: [] the data that will be passed back * notify: false by default this is to send a notification to a users email to alert them of an issue. */ -export const returnFunc = (data: Data) => { +export const returnFunc = (data: ReturnHelper) => { const notify = data.notify ? data.notify : false; const room = data.room ?? data.room; const log = createLogger({ module: data.module, subModule: data.subModule }); @@ -92,7 +71,7 @@ export const returnFunc = (data: Data) => { export function apiReturn( res: Response, - opts: Data & { status?: number }, + opts: ReturnHelper & { status?: number }, optional?: unknown, // leave this as unknown so we can pass an object or an array over. ): Response { const result = returnFunc(opts); diff --git a/brunoApi/datamart/Run Query.bru b/brunoApi/datamart/Run Query.bru index 99e0512..4f81c56 100644 --- a/brunoApi/datamart/Run Query.bru +++ b/brunoApi/datamart/Run Query.bru @@ -5,13 +5,17 @@ meta { } get { - url: {{url}}/api/datamart/:name + url: {{url}}/api/datamart/:name?historical=x body: none auth: inherit } +params:query { + historical: x +} + params:path { - name: activeArticles + name: inventory } settings { diff --git a/migrations/0032_tranquil_onslaught.sql b/migrations/0032_tranquil_onslaught.sql new file mode 100644 index 0000000..f532b6e --- /dev/null +++ b/migrations/0032_tranquil_onslaught.sql @@ -0,0 +1,20 @@ +CREATE TABLE "inv_historical_data" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "hist_date" date NOT NULL, + "plant_token" text, + "article" text NOT NULL, + "article_description" text NOT NULL, + "material_type" text, + "total_QTY" text, + "available_QTY" text, + "coa_QTY" text, + "held_QTY" text, + "consignment_qty" text, + "lot_number" text, + "location_id" text, + "location" text, + "whse_id" text DEFAULT '', + "whse_name" text DEFAULT 'missing whseName', + "upd_user" text DEFAULT 'lst', + "upd_date" timestamp DEFAULT now() +); diff --git a/migrations/0033_elite_adam_warlock.sql b/migrations/0033_elite_adam_warlock.sql new file mode 100644 index 0000000..f59fad9 --- /dev/null +++ b/migrations/0033_elite_adam_warlock.sql @@ -0,0 +1 @@ +ALTER TABLE "inv_historical_data" ALTER COLUMN "upd_user" SET DEFAULT 'lst-system'; \ No newline at end of file diff --git a/migrations/meta/0032_snapshot.json b/migrations/meta/0032_snapshot.json new file mode 100644 index 0000000..4ef2930 --- /dev/null +++ b/migrations/meta/0032_snapshot.json @@ -0,0 +1,1772 @@ +{ + "id": "905e30f6-52d5-411a-ba7f-03801fedf1cd", + "prevId": "28fc8929-ac3a-4d5a-81dc-1363cb4800d1", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.alpla_purchase_history": { + "name": "alpla_purchase_history", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "apo": { + "name": "apo", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "confirmed": { + "name": "confirmed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status_text": { + "name": "status_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "journal_num": { + "name": "journal_num", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "add_date": { + "name": "add_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "add_user": { + "name": "add_user", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "upd_user": { + "name": "upd_user", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "remark": { + "name": "remark", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "approved_status": { + "name": "approved_status", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'new'" + }, + "position": { + "name": "position", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.job_audit_log": { + "name": "job_audit_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "job_name": { + "name": "job_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "start_at": { + "name": "start_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "finished_at": { + "name": "finished_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "duration_ms": { + "name": "duration_ms", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error_stack": { + "name": "error_stack", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "meta_data": { + "name": "meta_data", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "idx_job_audit_logs_cleanup": { + "name": "idx_job_audit_logs_cleanup", + "columns": [ + { + "expression": "start_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.account": { + "name": "account", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "account_id": { + "name": "account_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "access_token": { + "name": "access_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "refresh_token": { + "name": "refresh_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "id_token": { + "name": "id_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "access_token_expires_at": { + "name": "access_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "refresh_token_expires_at": { + "name": "refresh_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "scope": { + "name": "scope", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "account_userId_idx": { + "name": "account_userId_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "account_user_id_user_id_fk": { + "name": "account_user_id_user_id_fk", + "tableFrom": "account", + "tableTo": "user", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.apikey": { + "name": "apikey", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "start": { + "name": "start", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "prefix": { + "name": "prefix", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "refill_interval": { + "name": "refill_interval", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "refill_amount": { + "name": "refill_amount", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "last_refill_at": { + "name": "last_refill_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "rate_limit_enabled": { + "name": "rate_limit_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "rate_limit_time_window": { + "name": "rate_limit_time_window", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 86400000 + }, + "rate_limit_max": { + "name": "rate_limit_max", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 10 + }, + "request_count": { + "name": "request_count", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "remaining": { + "name": "remaining", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "last_request": { + "name": "last_request", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "permissions": { + "name": "permissions", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "apikey_key_idx": { + "name": "apikey_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "apikey_userId_idx": { + "name": "apikey_userId_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "apikey_user_id_user_id_fk": { + "name": "apikey_user_id_user_id_fk", + "tableFrom": "apikey", + "tableTo": "user", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.jwks": { + "name": "jwks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "private_key": { + "name": "private_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.session": { + "name": "session", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "ip_address": { + "name": "ip_address", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "impersonated_by": { + "name": "impersonated_by", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "session_userId_idx": { + "name": "session_userId_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "session_user_id_user_id_fk": { + "name": "session_user_id_user_id_fk", + "tableFrom": "session", + "tableTo": "user", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "session_token_unique": { + "name": "session_token_unique", + "nullsNotDistinct": false, + "columns": [ + "token" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user": { + "name": "user", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email_verified": { + "name": "email_verified", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "image": { + "name": "image", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "banned": { + "name": "banned", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ban_reason": { + "name": "ban_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ban_expires": { + "name": "ban_expires", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "display_username": { + "name": "display_username", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "user_email_unique": { + "name": "user_email_unique", + "nullsNotDistinct": false, + "columns": [ + "email" + ] + }, + "user_username_unique": { + "name": "user_username_unique", + "nullsNotDistinct": false, + "columns": [ + "username" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.verification": { + "name": "verification", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "identifier": { + "name": "identifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "verification_identifier_idx": { + "name": "verification_identifier_idx", + "columns": [ + { + "expression": "identifier", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.datamart": { + "name": "datamart", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "query": { + "name": "query", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "options": { + "name": "options", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "''" + }, + "public_access": { + "name": "public_access", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "add_date": { + "name": "add_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "add_user": { + "name": "add_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'lst-system'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_user": { + "name": "upd_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'lst-system'" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "datamart_name_unique": { + "name": "datamart_name_unique", + "nullsNotDistinct": false, + "columns": [ + "name" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.inv_historical_data": { + "name": "inv_historical_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "hist_date": { + "name": "hist_date", + "type": "date", + "primaryKey": false, + "notNull": true + }, + "plant_token": { + "name": "plant_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "article": { + "name": "article", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "article_description": { + "name": "article_description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "material_type": { + "name": "material_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "total_QTY": { + "name": "total_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "available_QTY": { + "name": "available_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "coa_QTY": { + "name": "coa_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "held_QTY": { + "name": "held_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "consignment_qty": { + "name": "consignment_qty", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lot_number": { + "name": "lot_number", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "location_id": { + "name": "location_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "whse_id": { + "name": "whse_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "''" + }, + "whse_name": { + "name": "whse_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'missing whseName'" + }, + "upd_user": { + "name": "upd_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'lst'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.logs": { + "name": "logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "level": { + "name": "level", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "module": { + "name": "module", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subModule": { + "name": "subModule", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stack": { + "name": "stack", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "checked": { + "name": "checked", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "hostname": { + "name": "hostname", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.notifications": { + "name": "notifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "interval": { + "name": "interval", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'5'" + }, + "options": { + "name": "options", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + } + }, + "indexes": { + "notify_name": { + "name": "notify_name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.notification_sub": { + "name": "notification_sub", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "notification_id": { + "name": "notification_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "emails": { + "name": "emails", + "type": "text[]", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + } + }, + "indexes": {}, + "foreignKeys": { + "notification_sub_user_id_user_id_fk": { + "name": "notification_sub_user_id_user_id_fk", + "tableFrom": "notification_sub", + "tableTo": "user", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "notification_sub_notification_id_notifications_id_fk": { + "name": "notification_sub_notification_id_notifications_id_fk", + "tableFrom": "notification_sub", + "tableTo": "notifications", + "columnsFrom": [ + "notification_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "notification_sub_user_notification_unique": { + "name": "notification_sub_user_notification_unique", + "nullsNotDistinct": false, + "columns": [ + "user_id", + "notification_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.opendock_apt": { + "name": "opendock_apt", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "release": { + "name": "release", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "open_dock_apt_id": { + "name": "open_dock_apt_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "appointment": { + "name": "appointment", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "opendock_apt_release_idx": { + "name": "opendock_apt_release_idx", + "columns": [ + { + "expression": "release", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "opendock_apt_opendock_id_idx": { + "name": "opendock_apt_opendock_id_idx", + "columns": [ + { + "expression": "open_dock_apt_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "opendock_apt_release_unique": { + "name": "opendock_apt_release_unique", + "nullsNotDistinct": false, + "columns": [ + "release" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.printer_log": { + "name": "printer_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "printer_log_id_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ip": { + "name": "ip", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "printer_sn": { + "name": "printer_sn", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "condition": { + "name": "condition", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.printer_data": { + "name": "printer_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "humanReadable_id": { + "name": "humanReadable_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "ipAddress": { + "name": "ipAddress", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "port": { + "name": "port", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "statusText": { + "name": "statusText", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "printer_sn": { + "name": "printer_sn", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_time_printed": { + "name": "last_time_printed", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "assigned": { + "name": "assigned", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "remark": { + "name": "remark", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "printDelay": { + "name": "printDelay", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 90 + }, + "processes": { + "name": "processes", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "print_delay_override": { + "name": "print_delay_override", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "printer_id": { + "name": "printer_id", + "columns": [ + { + "expression": "humanReadable_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "printer_data_humanReadable_id_unique": { + "name": "printer_data_humanReadable_id_unique", + "nullsNotDistinct": false, + "columns": [ + "humanReadable_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.settings": { + "name": "settings", + "schema": "", + "columns": { + "settings_id": { + "name": "settings_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "moduleName": { + "name": "moduleName", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "roles": { + "name": "roles", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[\"systemAdmin\"]'::jsonb" + }, + "settingType": { + "name": "settingType", + "type": "setting_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "seed_version": { + "name": "seed_version", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "name": { + "name": "name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.stats": { + "name": "stats", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "default": "'serverStats'" + }, + "build": { + "name": "build", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "last_update": { + "name": "last_update", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.setting_type": { + "name": "setting_type", + "schema": "public", + "values": [ + "feature", + "system", + "standard" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/migrations/meta/0033_snapshot.json b/migrations/meta/0033_snapshot.json new file mode 100644 index 0000000..adb4398 --- /dev/null +++ b/migrations/meta/0033_snapshot.json @@ -0,0 +1,1772 @@ +{ + "id": "6901ee9d-7199-4e08-a733-fceb27ef38b2", + "prevId": "905e30f6-52d5-411a-ba7f-03801fedf1cd", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.alpla_purchase_history": { + "name": "alpla_purchase_history", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "apo": { + "name": "apo", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "confirmed": { + "name": "confirmed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status_text": { + "name": "status_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "journal_num": { + "name": "journal_num", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "add_date": { + "name": "add_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "add_user": { + "name": "add_user", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "upd_user": { + "name": "upd_user", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "remark": { + "name": "remark", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "approved_status": { + "name": "approved_status", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'new'" + }, + "position": { + "name": "position", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.job_audit_log": { + "name": "job_audit_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "job_name": { + "name": "job_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "start_at": { + "name": "start_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "finished_at": { + "name": "finished_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "duration_ms": { + "name": "duration_ms", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error_stack": { + "name": "error_stack", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "meta_data": { + "name": "meta_data", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "idx_job_audit_logs_cleanup": { + "name": "idx_job_audit_logs_cleanup", + "columns": [ + { + "expression": "start_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.account": { + "name": "account", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "account_id": { + "name": "account_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "access_token": { + "name": "access_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "refresh_token": { + "name": "refresh_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "id_token": { + "name": "id_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "access_token_expires_at": { + "name": "access_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "refresh_token_expires_at": { + "name": "refresh_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "scope": { + "name": "scope", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "account_userId_idx": { + "name": "account_userId_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "account_user_id_user_id_fk": { + "name": "account_user_id_user_id_fk", + "tableFrom": "account", + "tableTo": "user", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.apikey": { + "name": "apikey", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "start": { + "name": "start", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "prefix": { + "name": "prefix", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "refill_interval": { + "name": "refill_interval", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "refill_amount": { + "name": "refill_amount", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "last_refill_at": { + "name": "last_refill_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "rate_limit_enabled": { + "name": "rate_limit_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "rate_limit_time_window": { + "name": "rate_limit_time_window", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 86400000 + }, + "rate_limit_max": { + "name": "rate_limit_max", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 10 + }, + "request_count": { + "name": "request_count", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "remaining": { + "name": "remaining", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "last_request": { + "name": "last_request", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "permissions": { + "name": "permissions", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "apikey_key_idx": { + "name": "apikey_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "apikey_userId_idx": { + "name": "apikey_userId_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "apikey_user_id_user_id_fk": { + "name": "apikey_user_id_user_id_fk", + "tableFrom": "apikey", + "tableTo": "user", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.jwks": { + "name": "jwks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "private_key": { + "name": "private_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.session": { + "name": "session", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "ip_address": { + "name": "ip_address", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "impersonated_by": { + "name": "impersonated_by", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "session_userId_idx": { + "name": "session_userId_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "session_user_id_user_id_fk": { + "name": "session_user_id_user_id_fk", + "tableFrom": "session", + "tableTo": "user", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "session_token_unique": { + "name": "session_token_unique", + "nullsNotDistinct": false, + "columns": [ + "token" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user": { + "name": "user", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email_verified": { + "name": "email_verified", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "image": { + "name": "image", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "banned": { + "name": "banned", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ban_reason": { + "name": "ban_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ban_expires": { + "name": "ban_expires", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "display_username": { + "name": "display_username", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "user_email_unique": { + "name": "user_email_unique", + "nullsNotDistinct": false, + "columns": [ + "email" + ] + }, + "user_username_unique": { + "name": "user_username_unique", + "nullsNotDistinct": false, + "columns": [ + "username" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.verification": { + "name": "verification", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "identifier": { + "name": "identifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "verification_identifier_idx": { + "name": "verification_identifier_idx", + "columns": [ + { + "expression": "identifier", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.datamart": { + "name": "datamart", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "query": { + "name": "query", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "options": { + "name": "options", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "''" + }, + "public_access": { + "name": "public_access", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "add_date": { + "name": "add_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "add_user": { + "name": "add_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'lst-system'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_user": { + "name": "upd_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'lst-system'" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "datamart_name_unique": { + "name": "datamart_name_unique", + "nullsNotDistinct": false, + "columns": [ + "name" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.inv_historical_data": { + "name": "inv_historical_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "hist_date": { + "name": "hist_date", + "type": "date", + "primaryKey": false, + "notNull": true + }, + "plant_token": { + "name": "plant_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "article": { + "name": "article", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "article_description": { + "name": "article_description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "material_type": { + "name": "material_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "total_QTY": { + "name": "total_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "available_QTY": { + "name": "available_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "coa_QTY": { + "name": "coa_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "held_QTY": { + "name": "held_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "consignment_qty": { + "name": "consignment_qty", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lot_number": { + "name": "lot_number", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "location_id": { + "name": "location_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "whse_id": { + "name": "whse_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "''" + }, + "whse_name": { + "name": "whse_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'missing whseName'" + }, + "upd_user": { + "name": "upd_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'lst-system'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.logs": { + "name": "logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "level": { + "name": "level", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "module": { + "name": "module", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subModule": { + "name": "subModule", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stack": { + "name": "stack", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "checked": { + "name": "checked", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "hostname": { + "name": "hostname", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.notifications": { + "name": "notifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "interval": { + "name": "interval", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'5'" + }, + "options": { + "name": "options", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + } + }, + "indexes": { + "notify_name": { + "name": "notify_name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.notification_sub": { + "name": "notification_sub", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "notification_id": { + "name": "notification_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "emails": { + "name": "emails", + "type": "text[]", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + } + }, + "indexes": {}, + "foreignKeys": { + "notification_sub_user_id_user_id_fk": { + "name": "notification_sub_user_id_user_id_fk", + "tableFrom": "notification_sub", + "tableTo": "user", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "notification_sub_notification_id_notifications_id_fk": { + "name": "notification_sub_notification_id_notifications_id_fk", + "tableFrom": "notification_sub", + "tableTo": "notifications", + "columnsFrom": [ + "notification_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "notification_sub_user_notification_unique": { + "name": "notification_sub_user_notification_unique", + "nullsNotDistinct": false, + "columns": [ + "user_id", + "notification_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.opendock_apt": { + "name": "opendock_apt", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "release": { + "name": "release", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "open_dock_apt_id": { + "name": "open_dock_apt_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "appointment": { + "name": "appointment", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "opendock_apt_release_idx": { + "name": "opendock_apt_release_idx", + "columns": [ + { + "expression": "release", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "opendock_apt_opendock_id_idx": { + "name": "opendock_apt_opendock_id_idx", + "columns": [ + { + "expression": "open_dock_apt_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "opendock_apt_release_unique": { + "name": "opendock_apt_release_unique", + "nullsNotDistinct": false, + "columns": [ + "release" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.printer_log": { + "name": "printer_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "printer_log_id_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ip": { + "name": "ip", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "printer_sn": { + "name": "printer_sn", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "condition": { + "name": "condition", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.printer_data": { + "name": "printer_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "humanReadable_id": { + "name": "humanReadable_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "ipAddress": { + "name": "ipAddress", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "port": { + "name": "port", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "statusText": { + "name": "statusText", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "printer_sn": { + "name": "printer_sn", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_time_printed": { + "name": "last_time_printed", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "assigned": { + "name": "assigned", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "remark": { + "name": "remark", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "printDelay": { + "name": "printDelay", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 90 + }, + "processes": { + "name": "processes", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "print_delay_override": { + "name": "print_delay_override", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "printer_id": { + "name": "printer_id", + "columns": [ + { + "expression": "humanReadable_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "printer_data_humanReadable_id_unique": { + "name": "printer_data_humanReadable_id_unique", + "nullsNotDistinct": false, + "columns": [ + "humanReadable_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.settings": { + "name": "settings", + "schema": "", + "columns": { + "settings_id": { + "name": "settings_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "moduleName": { + "name": "moduleName", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "roles": { + "name": "roles", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[\"systemAdmin\"]'::jsonb" + }, + "settingType": { + "name": "settingType", + "type": "setting_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "seed_version": { + "name": "seed_version", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "name": { + "name": "name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.stats": { + "name": "stats", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "default": "'serverStats'" + }, + "build": { + "name": "build", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "last_update": { + "name": "last_update", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.setting_type": { + "name": "setting_type", + "schema": "public", + "values": [ + "feature", + "system", + "standard" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/migrations/meta/_journal.json b/migrations/meta/_journal.json index f714070..7932f31 100644 --- a/migrations/meta/_journal.json +++ b/migrations/meta/_journal.json @@ -225,6 +225,20 @@ "when": 1776098377074, "tag": "0031_numerous_the_phantom", "breakpoints": true + }, + { + "idx": 32, + "version": "7", + "when": 1776245938243, + "tag": "0032_tranquil_onslaught", + "breakpoints": true + }, + { + "idx": 33, + "version": "7", + "when": 1776256060808, + "tag": "0033_elite_adam_warlock", + "breakpoints": true } ] } \ No newline at end of file