feat(dm): added article description into the historical data
This commit is contained in:
@@ -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),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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(),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user