fix: rename the henza brand to montzar
اپ: اصلاح نام برند به منتزر Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* henza (MySQL `oapi`) → gold-bank (PostgreSQL) data import.
|
||||
* Legacy system (MySQL `oapi`) → montzar (PostgreSQL) data import.
|
||||
*
|
||||
* The rules live in docs/DATA-MIGRATION-MAP.md; every step cites its section.
|
||||
*
|
||||
@@ -8,7 +8,7 @@
|
||||
* npx ts-node --transpile-only scripts/legacy-import/index.ts \
|
||||
* --source "mysql://user:pass@127.0.0.1:3307/oapi" \
|
||||
* --target "postgresql://user:pass@localhost:5432/goldbank_import_test" \
|
||||
* [--images "F:/henza/storage" --upload-dir "./storage/uploads"] \
|
||||
* [--images "F:/legacy/storage" --upload-dir "./storage/uploads"] \
|
||||
* [--only customers,ledger] [--report ./legacy-import-report.md] --yes
|
||||
*
|
||||
* Safety:
|
||||
|
||||
@@ -9,7 +9,7 @@ import { createPool, type Pool, type RowDataPacket } from 'mysql2/promise';
|
||||
export interface Options {
|
||||
sourceUrl: string;
|
||||
targetUrl: string;
|
||||
/** henza `storage/` folder holding the image files (optional). */
|
||||
/** Legacy system's `storage/` folder holding the image files (optional). */
|
||||
imagesDir?: string;
|
||||
/** Target UPLOAD_DIR the files are copied into (required with imagesDir). */
|
||||
uploadDir?: string;
|
||||
@@ -56,7 +56,7 @@ export class Report {
|
||||
}
|
||||
|
||||
render(header: string[]): string {
|
||||
const out: string[] = ['# henza → gold-bank import report', '', ...header, ''];
|
||||
const out: string[] = ['# legacy (oapi) → montzar import report', '', ...header, ''];
|
||||
for (const [step, s] of this.sections) {
|
||||
out.push(`## ${step}`, '');
|
||||
if (s.counts.size) {
|
||||
@@ -317,7 +317,7 @@ function copyImage(ctx: Ctx, file: string, step: string) {
|
||||
return;
|
||||
}
|
||||
if (!existsSync(from) || !statSync(from).isFile()) {
|
||||
ctx.report.count('images', 'missing in henza storage');
|
||||
ctx.report.count('images', 'missing in legacy storage');
|
||||
ctx.report.note('images', `missing file ${file} (referenced from ${step})`);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Value conversion from the henza MySQL schema to the Prisma one.
|
||||
* Value conversion from the legacy system's MySQL schema to the Prisma one.
|
||||
*
|
||||
* Every helper here is pure, so the rules can be read and tested in isolation.
|
||||
* Each rule is the one recorded in docs/DATA-MIGRATION-MAP.md.
|
||||
|
||||
Reference in New Issue
Block a user