@devx-commerce/plugin-gati 0.0.34-beta.30 → 0.0.34-beta.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.medusa/server/src/modules/addless-detail/migrations/Migration20260226053037.js +15 -0
- package/.medusa/server/src/modules/jewel-trans-master/migrations/{Migration20260101104355.js → Migration20260226053036.js} +23 -17
- package/.medusa/server/src/modules/order-master/migrations/{Migration20251204071941.js → Migration20260226053036.js} +11 -9
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20260226053037 = void 0;
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20260226053037 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql(`create table if not exists "addless_master" ("id" text not null, "branch_no" text not null, "book_no" text not null, "sr_no" integer not null, "calculation_id" integer not null, "prompt" text not null, "prompt_alias" text not null, "per_amt" boolean not null, "calculation_name" text not null, "calculation_for" integer not null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "addless_master_pkey" primary key ("id"));`);
|
|
8
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_addless_master_deleted_at" ON "addless_master" ("deleted_at") WHERE deleted_at IS NULL;`);
|
|
9
|
+
}
|
|
10
|
+
async down() {
|
|
11
|
+
this.addSql(`drop table if exists "addless_master" cascade;`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.Migration20260226053037 = Migration20260226053037;
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNjAyMjYwNTMwMzcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9hZGRsZXNzLWRldGFpbC9taWdyYXRpb25zL01pZ3JhdGlvbjIwMjYwMjI2MDUzMDM3LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHlFQUFxRTtBQUVyRSxNQUFhLHVCQUF3QixTQUFRLHNCQUFTO0lBRTNDLEtBQUssQ0FBQyxFQUFFO1FBQ2YsSUFBSSxDQUFDLE1BQU0sQ0FBQyxrZ0JBQWtnQixDQUFDLENBQUM7UUFDaGhCLElBQUksQ0FBQyxNQUFNLENBQUMseUhBQXlILENBQUMsQ0FBQztJQUN6SSxDQUFDO0lBRVEsS0FBSyxDQUFDLElBQUk7UUFDakIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxnREFBZ0QsQ0FBQyxDQUFDO0lBQ2hFLENBQUM7Q0FFRjtBQVhELDBEQVdDIn0=
|
|
@@ -1,34 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Migration20260226053036 = void 0;
|
|
4
4
|
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
-
class
|
|
5
|
+
class Migration20260226053036 extends migrations_1.Migration {
|
|
6
6
|
async up() {
|
|
7
7
|
this.addSql(`create table if not exists "jewel_trans_master" ("id" text not null, "erp_jewel_trans_id" integer not null, "jewel_trans_prefix" text null, "jewel_trans_no" text null, "jewel_trans_date" timestamptz not null, "party_no" text null, "firm_name" text null, "sales_person" text null, "branch_no" text null, "branch_name" text null, "gross_amount" integer null, "total_addless_amount" integer null, "amount" integer null, "remarks" text null, "shipping_id" integer null, "promocode_series_id" integer null, "promocode" text null, "promocode_percentage" integer null, "promocode_amount" integer null, "metadata" jsonb not null default '{}', "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "jewel_trans_master_pkey" primary key ("id"));`);
|
|
8
|
-
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_master_deleted_at" ON "jewel_trans_master" (deleted_at) WHERE deleted_at IS NULL;`);
|
|
8
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_master_deleted_at" ON "jewel_trans_master" ("deleted_at") WHERE deleted_at IS NULL;`);
|
|
9
9
|
this.addSql(`create table if not exists "jewel_trans_inward" ("id" text not null, "erp_jewel_trans_id" integer not null, "jewel_id" integer null, "jewel_code" text null, "style_id" integer null, "mrp_amt" integer null, "rate_chart" text null, "labour_chart" text null, "policy_id" integer null, "metadata" jsonb not null default '{}', "jewel_trans_master_id" text not null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "jewel_trans_inward_pkey" primary key ("id"));`);
|
|
10
|
-
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_inward_jewel_trans_master_id" ON "jewel_trans_inward" (jewel_trans_master_id) WHERE deleted_at IS NULL;`);
|
|
11
|
-
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_inward_deleted_at" ON "jewel_trans_inward" (deleted_at) WHERE deleted_at IS NULL;`);
|
|
10
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_inward_jewel_trans_master_id" ON "jewel_trans_inward" ("jewel_trans_master_id") WHERE deleted_at IS NULL;`);
|
|
11
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_inward_deleted_at" ON "jewel_trans_inward" ("deleted_at") WHERE deleted_at IS NULL;`);
|
|
12
12
|
this.addSql(`create table if not exists "jewel_trans_inward_exploration" ("id" text not null, "erp_jewel_trans_id" integer not null, "jewel_id" integer null, "exploration_id" integer null, "exploration_name" text null, "exploration_code" text null, "exploration_value" text null, "metadata" jsonb not null default '{}', "jewel_trans_inward_id" text not null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "jewel_trans_inward_exploration_pkey" primary key ("id"));`);
|
|
13
|
-
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_inward_exploration_jewel_trans_inward_id" ON "jewel_trans_inward_exploration" (jewel_trans_inward_id) WHERE deleted_at IS NULL;`);
|
|
14
|
-
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_inward_exploration_deleted_at" ON "jewel_trans_inward_exploration" (deleted_at) WHERE deleted_at IS NULL;`);
|
|
13
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_inward_exploration_jewel_trans_inward_id" ON "jewel_trans_inward_exploration" ("jewel_trans_inward_id") WHERE deleted_at IS NULL;`);
|
|
14
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_inward_exploration_deleted_at" ON "jewel_trans_inward_exploration" ("deleted_at") WHERE deleted_at IS NULL;`);
|
|
15
15
|
this.addSql(`create table if not exists "jewel_trans_inward_detail" ("id" text not null, "erp_jewel_trans_id" integer not null, "jewel_id" integer null, "jewel_detail_id" integer null, "item_id" integer null, "item_name" text null, "item_code" text null, "raw_formula" text null, "original_rate" integer null, "dis_markup_on" boolean null, "dis_markup_per" integer null, "rate" integer null, "amount" integer null, "dis_markup_amt" integer null, "final_amt" integer null, "loss_per" integer null, "loss_per_is_fix" boolean null, "loss_weight" integer null, "loss_amt" integer null, "original_cpf_rate" integer null, "cpf_dis_markup_per" integer null, "cpf_rate" integer null, "cpf_is_fix" boolean null, "original_cpf_amt" integer null, "cpf_amt_dis_markup_per" integer null, "cpf_amt" integer null, "metadata" jsonb not null default '{}', "jewel_trans_inward_id" text not null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "jewel_trans_inward_detail_pkey" primary key ("id"));`);
|
|
16
|
-
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_inward_detail_jewel_trans_inward_id" ON "jewel_trans_inward_detail" (jewel_trans_inward_id) WHERE deleted_at IS NULL;`);
|
|
17
|
-
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_inward_detail_deleted_at" ON "jewel_trans_inward_detail" (deleted_at) WHERE deleted_at IS NULL;`);
|
|
16
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_inward_detail_jewel_trans_inward_id" ON "jewel_trans_inward_detail" ("jewel_trans_inward_id") WHERE deleted_at IS NULL;`);
|
|
17
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_inward_detail_deleted_at" ON "jewel_trans_inward_detail" ("deleted_at") WHERE deleted_at IS NULL;`);
|
|
18
18
|
this.addSql(`create table if not exists "jewel_trans_giftcode_detail" ("id" text not null, "erp_jewel_trans_id" integer not null, "giftcode_id" integer null, "giftcode" text null, "amount" integer null, "metadata" jsonb not null default '{}', "jewel_trans_master_id" text not null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "jewel_trans_giftcode_detail_pkey" primary key ("id"));`);
|
|
19
|
-
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_giftcode_detail_jewel_trans_master_id" ON "jewel_trans_giftcode_detail" (jewel_trans_master_id) WHERE deleted_at IS NULL;`);
|
|
20
|
-
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_giftcode_detail_deleted_at" ON "jewel_trans_giftcode_detail" (deleted_at) WHERE deleted_at IS NULL;`);
|
|
19
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_giftcode_detail_jewel_trans_master_id" ON "jewel_trans_giftcode_detail" ("jewel_trans_master_id") WHERE deleted_at IS NULL;`);
|
|
20
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_giftcode_detail_deleted_at" ON "jewel_trans_giftcode_detail" ("deleted_at") WHERE deleted_at IS NULL;`);
|
|
21
21
|
this.addSql(`create table if not exists "jewel_trans_payment_option" ("id" text not null, "erp_jewel_trans_id" integer not null, "book_name" text null, "voucher_entry_id" integer null, "trans_prefix" text null, "trans_no" text null, "transaction_date" timestamptz null, "doc_no" text null, "remarks" text null, "amount" integer null, "metadata" jsonb not null default '{}', "jewel_trans_master_id" text not null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "jewel_trans_payment_option_pkey" primary key ("id"));`);
|
|
22
|
-
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_payment_option_jewel_trans_master_id" ON "jewel_trans_payment_option" (jewel_trans_master_id) WHERE deleted_at IS NULL;`);
|
|
23
|
-
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_payment_option_deleted_at" ON "jewel_trans_payment_option" (deleted_at) WHERE deleted_at IS NULL;`);
|
|
22
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_payment_option_jewel_trans_master_id" ON "jewel_trans_payment_option" ("jewel_trans_master_id") WHERE deleted_at IS NULL;`);
|
|
23
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_payment_option_deleted_at" ON "jewel_trans_payment_option" ("deleted_at") WHERE deleted_at IS NULL;`);
|
|
24
24
|
this.addSql(`create table if not exists "jewel_trans_xtra_charges" ("id" text not null, "erp_jewel_trans_id" integer not null, "jewel_id" integer null, "extra_charge_id" integer null, "extra_charge_name" text null, "extra_charge_code" text null, "amount" integer null, "metadata" jsonb not null default '{}', "jewel_trans_inward_id" text not null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "jewel_trans_xtra_charges_pkey" primary key ("id"));`);
|
|
25
|
-
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_xtra_charges_jewel_trans_inward_id" ON "jewel_trans_xtra_charges" (jewel_trans_inward_id) WHERE deleted_at IS NULL;`);
|
|
26
|
-
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_xtra_charges_deleted_at" ON "jewel_trans_xtra_charges" (deleted_at) WHERE deleted_at IS NULL;`);
|
|
25
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_xtra_charges_jewel_trans_inward_id" ON "jewel_trans_xtra_charges" ("jewel_trans_inward_id") WHERE deleted_at IS NULL;`);
|
|
26
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_jewel_trans_xtra_charges_deleted_at" ON "jewel_trans_xtra_charges" ("deleted_at") WHERE deleted_at IS NULL;`);
|
|
27
|
+
this.addSql(`alter table if exists "jewel_trans_inward" drop constraint if exists "jewel_trans_inward_jewel_trans_master_id_foreign";`);
|
|
27
28
|
this.addSql(`alter table if exists "jewel_trans_inward" add constraint "jewel_trans_inward_jewel_trans_master_id_foreign" foreign key ("jewel_trans_master_id") references "jewel_trans_master" ("id") on update cascade on delete cascade;`);
|
|
29
|
+
this.addSql(`alter table if exists "jewel_trans_inward_exploration" drop constraint if exists "jewel_trans_inward_exploration_jewel_trans_inward_id_foreign";`);
|
|
28
30
|
this.addSql(`alter table if exists "jewel_trans_inward_exploration" add constraint "jewel_trans_inward_exploration_jewel_trans_inward_id_foreign" foreign key ("jewel_trans_inward_id") references "jewel_trans_inward" ("id") on update cascade on delete cascade;`);
|
|
31
|
+
this.addSql(`alter table if exists "jewel_trans_inward_detail" drop constraint if exists "jewel_trans_inward_detail_jewel_trans_inward_id_foreign";`);
|
|
29
32
|
this.addSql(`alter table if exists "jewel_trans_inward_detail" add constraint "jewel_trans_inward_detail_jewel_trans_inward_id_foreign" foreign key ("jewel_trans_inward_id") references "jewel_trans_inward" ("id") on update cascade on delete cascade;`);
|
|
33
|
+
this.addSql(`alter table if exists "jewel_trans_giftcode_detail" drop constraint if exists "jewel_trans_giftcode_detail_jewel_trans_master_id_foreign";`);
|
|
30
34
|
this.addSql(`alter table if exists "jewel_trans_giftcode_detail" add constraint "jewel_trans_giftcode_detail_jewel_trans_master_id_foreign" foreign key ("jewel_trans_master_id") references "jewel_trans_master" ("id") on update cascade on delete cascade;`);
|
|
35
|
+
this.addSql(`alter table if exists "jewel_trans_payment_option" drop constraint if exists "jewel_trans_payment_option_jewel_trans_master_id_foreign";`);
|
|
31
36
|
this.addSql(`alter table if exists "jewel_trans_payment_option" add constraint "jewel_trans_payment_option_jewel_trans_master_id_foreign" foreign key ("jewel_trans_master_id") references "jewel_trans_master" ("id") on update cascade on delete cascade;`);
|
|
37
|
+
this.addSql(`alter table if exists "jewel_trans_xtra_charges" drop constraint if exists "jewel_trans_xtra_charges_jewel_trans_inward_id_foreign";`);
|
|
32
38
|
this.addSql(`alter table if exists "jewel_trans_xtra_charges" add constraint "jewel_trans_xtra_charges_jewel_trans_inward_id_foreign" foreign key ("jewel_trans_inward_id") references "jewel_trans_inward" ("id") on update cascade on delete cascade;`);
|
|
33
39
|
}
|
|
34
40
|
async down() {
|
|
@@ -47,5 +53,5 @@ class Migration20260101104355 extends migrations_1.Migration {
|
|
|
47
53
|
this.addSql(`drop table if exists "jewel_trans_xtra_charges" cascade;`);
|
|
48
54
|
}
|
|
49
55
|
}
|
|
50
|
-
exports.
|
|
51
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
56
|
+
exports.Migration20260226053036 = Migration20260226053036;
|
|
57
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNjAyMjYwNTMwMzYuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9qZXdlbC10cmFucy1tYXN0ZXIvbWlncmF0aW9ucy9NaWdyYXRpb24yMDI2MDIyNjA1MzAzNi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5RUFBcUU7QUFFckUsTUFBYSx1QkFBd0IsU0FBUSxzQkFBUztJQUUzQyxLQUFLLENBQUMsRUFBRTtRQUNmLElBQUksQ0FBQyxNQUFNLENBQUMsdXpCQUF1ekIsQ0FBQyxDQUFDO1FBQ3I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EosSUFBSSxDQUFDLE1BQU0sQ0FBQyxzSUFBc0ksQ0FBQyxDQUFDO1FBRXBKLElBQUksQ0FBQyxNQUFNLENBQUMsb0RBQW9ELENBQUMsQ0FBQztRQUVsRSxJQUFJLENBQUMsTUFBTSxDQUFDLG9EQUFvRCxDQUFDLENBQUM7UUFFbEUsSUFBSSxDQUFDLE1BQU0sQ0FBQyxnRUFBZ0UsQ0FBQyxDQUFDO1FBRTlFLElBQUksQ0FBQyxNQUFNLENBQUMsMkRBQTJELENBQUMsQ0FBQztRQUV6RSxJQUFJLENBQUMsTUFBTSxDQUFDLDZEQUE2RCxDQUFDLENBQUM7UUFFM0UsSUFBSSxDQUFDLE1BQU0sQ0FBQyw0REFBNEQsQ0FBQyxDQUFDO1FBRTFFLElBQUksQ0FBQyxNQUFNLENBQUMsMERBQTBELENBQUMsQ0FBQztJQUMxRSxDQUFDO0NBRUY7QUE3RUQsMERBNkVDIn0=
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Migration20260226053036 = void 0;
|
|
4
4
|
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
-
class
|
|
5
|
+
class Migration20260226053036 extends migrations_1.Migration {
|
|
6
6
|
async up() {
|
|
7
7
|
this.addSql(`create table if not exists "order_master" ("id" text not null, "erp_order_id" integer not null, "branch_no" text null, "branch_name" text null, "order_prefix" text not null, "order_no" text not null, "order_date" timestamptz not null, "customer_id" text null, "customer_name" text null, "po_no" text null, "po_date" timestamptz null, "sales_person" text null, "work_order_no" text null, "remarks" text null, "shipping_id" integer null, "promocode_series_id" integer null, "promocode" text null, "promocode_percentage" integer null, "promocode_amount" integer null, "metadata" jsonb not null default '{}', "giftcode_details" jsonb null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "order_master_pkey" primary key ("id"));`);
|
|
8
|
-
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_order_master_deleted_at" ON "order_master" (deleted_at) WHERE deleted_at IS NULL;`);
|
|
8
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_order_master_deleted_at" ON "order_master" ("deleted_at") WHERE deleted_at IS NULL;`);
|
|
9
9
|
this.addSql(`create table if not exists "order_detail_master" ("id" text not null, "order_item_id" integer not null, "erp_order_id" integer not null, "sr_no" integer not null, "style_id" integer not null, "style_code" text not null, "party_style_id" integer not null, "party_style_code" text null, "jewel_id" integer null, "jewel_code" text null, "item_size_id" integer not null, "item_size" text not null, "item_size_name" text not null, "order_qty" integer not null, "order_item_pcs" integer not null, "metal_item_id" integer not null, "metal" text not null, "metal_name" text not null, "metal_tone_no" integer not null, "tone" text not null, "tone_name" text not null, "item_po_no" text null, "item_ref_no" text null, "priority_id" integer not null, "priority" text not null, "priority_name" text not null, "stock_type_no" integer not null, "stock_type" text not null, "stock_type_code" text not null, "make_type_no" integer not null, "make_type" text not null, "make_type_code" text not null, "customer_production_instruction" text null, "special_remarks" text null, "design_production_instruction" text null, "stamp_instruction" text null, "expected_delivery_date" timestamptz not null, "mrp" integer not null, "metadata" jsonb not null default '{}', "order_master_id" text not null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "order_detail_master_pkey" primary key ("id"));`);
|
|
10
|
-
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_order_detail_master_order_master_id" ON "order_detail_master" (order_master_id) WHERE deleted_at IS NULL;`);
|
|
11
|
-
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_order_detail_master_deleted_at" ON "order_detail_master" (deleted_at) WHERE deleted_at IS NULL;`);
|
|
10
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_order_detail_master_order_master_id" ON "order_detail_master" ("order_master_id") WHERE deleted_at IS NULL;`);
|
|
11
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_order_detail_master_deleted_at" ON "order_detail_master" ("deleted_at") WHERE deleted_at IS NULL;`);
|
|
12
12
|
this.addSql(`create table if not exists "order_payment_option_master" ("id" text not null, "book_name" text not null, "erp_order_id" integer not null, "voucher_entry_id" integer not null, "trans_prefix" text not null, "trans_no" text not null, "transaction_date" timestamptz not null, "doc_no" text null, "remarks" text null, "amount" integer not null, "metadata" jsonb not null default '{}', "order_master_id" text not null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "order_payment_option_master_pkey" primary key ("id"));`);
|
|
13
|
-
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_order_payment_option_master_order_master_id" ON "order_payment_option_master" (order_master_id) WHERE deleted_at IS NULL;`);
|
|
14
|
-
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_order_payment_option_master_deleted_at" ON "order_payment_option_master" (deleted_at) WHERE deleted_at IS NULL;`);
|
|
13
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_order_payment_option_master_order_master_id" ON "order_payment_option_master" ("order_master_id") WHERE deleted_at IS NULL;`);
|
|
14
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_order_payment_option_master_deleted_at" ON "order_payment_option_master" ("deleted_at") WHERE deleted_at IS NULL;`);
|
|
15
|
+
this.addSql(`alter table if exists "order_detail_master" drop constraint if exists "order_detail_master_order_master_id_foreign";`);
|
|
15
16
|
this.addSql(`alter table if exists "order_detail_master" add constraint "order_detail_master_order_master_id_foreign" foreign key ("order_master_id") references "order_master" ("id") on update cascade on delete cascade;`);
|
|
17
|
+
this.addSql(`alter table if exists "order_payment_option_master" drop constraint if exists "order_payment_option_master_order_master_id_foreign";`);
|
|
16
18
|
this.addSql(`alter table if exists "order_payment_option_master" add constraint "order_payment_option_master_order_master_id_foreign" foreign key ("order_master_id") references "order_master" ("id") on update cascade on delete cascade;`);
|
|
17
19
|
}
|
|
18
20
|
async down() {
|
|
@@ -23,5 +25,5 @@ class Migration20251204071941 extends migrations_1.Migration {
|
|
|
23
25
|
this.addSql(`drop table if exists "order_payment_option_master" cascade;`);
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
|
-
exports.
|
|
27
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
28
|
+
exports.Migration20260226053036 = Migration20260226053036;
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNjAyMjYwNTMwMzYuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9vcmRlci1tYXN0ZXIvbWlncmF0aW9ucy9NaWdyYXRpb24yMDI2MDIyNjA1MzAzNi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5RUFBcUU7QUFFckUsTUFBYSx1QkFBd0IsU0FBUSxzQkFBUztJQUUzQyxLQUFLLENBQUMsRUFBRTtRQUNmLElBQUksQ0FBQyxNQUFNLENBQUMsa3pCQUFrekIsQ0FBQyxDQUFDO1FBQ2gwQixJQUFJLENBQUMsTUFBTSxDQUFDLHFIQUFxSCxDQUFDLENBQUM7UUFFbkksSUFBSSxDQUFDLE1BQU0sQ0FBQyx5N0NBQXk3QyxDQUFDLENBQUM7UUFDdjhDLElBQUksQ0FBQyxNQUFNLENBQUMsNklBQTZJLENBQUMsQ0FBQztRQUMzSixJQUFJLENBQUMsTUFBTSxDQUFDLG1JQUFtSSxDQUFDLENBQUM7UUFFakosSUFBSSxDQUFDLE1BQU0sQ0FBQyxrbUJBQWttQixDQUFDLENBQUM7UUFDaG5CLElBQUksQ0FBQyxNQUFNLENBQUMsNkpBQTZKLENBQUMsQ0FBQztRQUMzSyxJQUFJLENBQUMsTUFBTSxDQUFDLG1KQUFtSixDQUFDLENBQUM7UUFFakssSUFBSSxDQUFDLE1BQU0sQ0FBQyxzSEFBc0gsQ0FBQyxDQUFDO1FBQ3BJLElBQUksQ0FBQ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