feat(dm): added article description into the historical data

This commit is contained in:
2025-11-25 14:58:47 -06:00
parent cd53460bec
commit 7311372ba8
6 changed files with 2246 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
meta {
name: datamart
seq: 8
}
auth {
mode: inherit
}

View File

@@ -12,7 +12,6 @@ import { db } from "../../../../pkg/db/db.js";
import {
type ForecastData,
forecastData,
forecastDataSchema,
} from "../../../../pkg/db/schema/forecastEDIData.js";
import { prodQuery } from "../../../../pkg/prodSql/prodQuery.js";
import { activeArticle } from "../../../../pkg/prodSql/querys/datamart/article.js";
@@ -44,6 +43,7 @@ export const forecastEdiData = async (data: ForecastData[]) => {
forecaseEDIDATA.push({
...newData,
article: activeAV[0].IdArtikelvarianten,
description: activeAV[0].Bezeichnung, // change this later once we migrate more items
requirementDate: new Date(newData.requirementDate),
});
}

View File

@@ -18,6 +18,7 @@ export const forecastData = pgTable("forecast_Data", {
quantity: real("quantity"),
requirementDate: timestamp("requirement_date").notNull(),
article: integer("article"),
description: text("description"),
createdAt: timestamp("created_at").defaultNow(),
});

View File

@@ -0,0 +1,2 @@
ALTER TABLE "forecast_Data" ADD COLUMN "description" text;--> statement-breakpoint
ALTER TABLE "lease_invoices" ADD COLUMN "comment" text;

File diff suppressed because it is too large Load Diff

View File

@@ -316,6 +316,13 @@
"when": 1762314701057,
"tag": "0044_melted_mole_man",
"breakpoints": true
},
{
"idx": 45,
"version": "7",
"when": 1764104121933,
"tag": "0045_redundant_taskmaster",
"breakpoints": true
}
]
}