This commit is contained in:
seb
2026-09-29 18:26:42 +02:00
parent 30820ba8c7
commit 69bd0935cc
14 changed files with 710 additions and 20 deletions

View File

@@ -406,6 +406,11 @@ export class BetterSqlite3Provider extends BetterSqlite3Executor {
`ALTER TABLE article ADD COLUMN track_stock INTEGER NOT NULL DEFAULT 1`,
);
}
if (articleCols.length > 0 && !articleCols.includes('fatherattributename_id')) {
this.db.exec(
`ALTER TABLE article ADD COLUMN fatherattributename_id INTEGER REFERENCES attributename(id) ON DELETE NO ACTION`,
);
}
const warehouseCols = this.db.pragma('table_info("warehouse")').map((c) => c.name);
if (warehouseCols.length > 0 && !warehouseCols.includes('sort')) {