@reachu/database 1.0.83 → 1.0.85
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/dist/entity/ChannelUser.d.ts +2 -0
- package/dist/entity/ChannelUser.js +6 -0
- package/dist/entity/ChannelUser.js.map +1 -1
- package/dist/entity/ShopifyConnection.js +1 -2
- package/dist/entity/ShopifyConnection.js.map +1 -1
- package/dist/migrations/1687876131132-migration-develop.d.ts +6 -0
- package/dist/migrations/1687876131132-migration-develop.js +31 -0
- package/dist/migrations/1687876131132-migration-develop.js.map +1 -0
- package/dist/migrations/1687877455406-migration-develop_01.d.ts +6 -0
- package/dist/migrations/1687877455406-migration-develop_01.js +37 -0
- package/dist/migrations/1687877455406-migration-develop_01.js.map +1 -0
- package/dist/migrations/1687877967732-migration-pre-develop.d.ts +6 -0
- package/dist/migrations/1687877967732-migration-pre-develop.js +31 -0
- package/dist/migrations/1687877967732-migration-pre-develop.js.map +1 -0
- package/dist/migrations/1687909776321-migration-pre-develop-shopiffy-connection.d.ts +6 -0
- package/dist/migrations/1687909776321-migration-pre-develop-shopiffy-connection.js +35 -0
- package/dist/migrations/1687909776321-migration-pre-develop-shopiffy-connection.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +53 -3
- package/package.json +3 -3
- package/src/entity/ChannelUser.ts +6 -0
- package/src/entity/ShopifyConnection.ts +0 -1
- package/src/migrations/1687876131132-migration-develop.ts +16 -0
- package/src/migrations/1687877455406-migration-develop_01.ts +22 -0
- package/src/migrations/1687877967732-migration-pre-develop.ts +16 -0
- package/src/migrations/1687909776321-migration-pre-develop-shopiffy-connection.ts +20 -0
|
@@ -3,6 +3,7 @@ import Channel from './Channel';
|
|
|
3
3
|
import ChannelGroup from './ChannelGroup';
|
|
4
4
|
import ChannelUserProductSync from './ChannelUserProductSync';
|
|
5
5
|
import User from './User';
|
|
6
|
+
import ShopifyConnection from './ShopifyConnection';
|
|
6
7
|
export default class ChannelUser extends AuditedModel {
|
|
7
8
|
deletedAt: Date;
|
|
8
9
|
id: number;
|
|
@@ -11,4 +12,5 @@ export default class ChannelUser extends AuditedModel {
|
|
|
11
12
|
channel: Channel;
|
|
12
13
|
channelGroup: ChannelGroup[];
|
|
13
14
|
channelUserProductSync: ChannelUserProductSync[];
|
|
15
|
+
shopifyConnection: ShopifyConnection;
|
|
14
16
|
}
|
|
@@ -18,6 +18,7 @@ const Channel_1 = __importDefault(require("./Channel"));
|
|
|
18
18
|
const ChannelGroup_1 = __importDefault(require("./ChannelGroup"));
|
|
19
19
|
const ChannelUserProductSync_1 = __importDefault(require("./ChannelUserProductSync"));
|
|
20
20
|
const User_1 = __importDefault(require("./User"));
|
|
21
|
+
const ShopifyConnection_1 = __importDefault(require("./ShopifyConnection"));
|
|
21
22
|
let ChannelUser = class ChannelUser extends AuditedModel_1.default {
|
|
22
23
|
};
|
|
23
24
|
__decorate([
|
|
@@ -56,6 +57,11 @@ __decorate([
|
|
|
56
57
|
typeorm_1.JoinColumn(),
|
|
57
58
|
__metadata("design:type", Array)
|
|
58
59
|
], ChannelUser.prototype, "channelUserProductSync", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
typeorm_1.ManyToOne(() => ShopifyConnection_1.default, (shopifyConnection) => shopifyConnection.id, { nullable: true }),
|
|
62
|
+
typeorm_1.JoinColumn(),
|
|
63
|
+
__metadata("design:type", ShopifyConnection_1.default)
|
|
64
|
+
], ChannelUser.prototype, "shopifyConnection", void 0);
|
|
59
65
|
ChannelUser = __decorate([
|
|
60
66
|
typeorm_1.Entity()
|
|
61
67
|
], ChannelUser);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelUser.js","sourceRoot":"","sources":["../../src/entity/ChannelUser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAQiB;AACjB,kEAA0C;AAC1C,wDAAgC;AAChC,kEAA0C;AAC1C,sFAA8D;AAC9D,kDAA0B;
|
|
1
|
+
{"version":3,"file":"ChannelUser.js","sourceRoot":"","sources":["../../src/entity/ChannelUser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAQiB;AACjB,kEAA0C;AAC1C,wDAAgC;AAChC,kEAA0C;AAC1C,sFAA8D;AAC9D,kDAA0B;AAC1B,4EAAoD;AAGpD,IAAqB,WAAW,GAAhC,MAAqB,WAAY,SAAQ,sBAAY;CAsCpD,CAAA;AApCC;IADC,0BAAgB,EAAE;8BACR,IAAI;8CAAC;AAGhB;IADC,gCAAsB,EAAE;;uCACd;AAGX;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACnB;AAInB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACjE,oBAAU,EAAE;8BACP,cAAI;yCAAC;AAIX;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,iBAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACnF,oBAAU,EAAE;8BACJ,iBAAO;4CAAC;AAMjB;IAJC,mBAAS,CAAC,GAAG,EAAE,CAAC,sBAAY,EAAE,CAAC,YAA0B,EAAE,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE;QACvF,OAAO,EAAE,IAAI;KACd,CAAC;IACD,oBAAU,EAAE;;iDACgB;AAU7B;IARC,mBAAS,CACR,GAAG,EAAE,CAAC,gCAAsB,EAC5B,CAAC,sBAA8C,EAAE,EAAE,CAAC,sBAAsB,CAAC,WAAW,EACtF;QACE,OAAO,EAAE,IAAI;KACd,CACF;IACA,oBAAU,EAAE;;2DACoC;AAIjD;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,2BAAiB,EAAE,CAAC,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACnG,oBAAU,EAAE;8BACM,2BAAiB;sDAAC;AApClB,WAAW;IAD/B,gBAAM,EAAE;GACY,WAAW,CAsC/B;kBAtCoB,WAAW"}
|
|
@@ -65,8 +65,7 @@ __decorate([
|
|
|
65
65
|
], ShopifyConnection.prototype, "locationId", void 0);
|
|
66
66
|
ShopifyConnection = __decorate([
|
|
67
67
|
typeorm_1.Entity(),
|
|
68
|
-
typeorm_1.Unique(['supplier', 'deletedAt'])
|
|
69
|
-
typeorm_1.Unique(['reseller', 'deletedAt'])
|
|
68
|
+
typeorm_1.Unique(['supplier', 'deletedAt'])
|
|
70
69
|
], ShopifyConnection);
|
|
71
70
|
exports.default = ShopifyConnection;
|
|
72
71
|
//# sourceMappingURL=ShopifyConnection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShopifyConnection.js","sourceRoot":"","sources":["../../src/entity/ShopifyConnection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCASiB;AACjB,kDAA0B;AAC1B,kEAA0C;
|
|
1
|
+
{"version":3,"file":"ShopifyConnection.js","sourceRoot":"","sources":["../../src/entity/ShopifyConnection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCASiB;AACjB,kDAA0B;AAC1B,kEAA0C;AAI1C,IAAqB,iBAAiB,GAAtC,MAAqB,iBAAkB,SAAQ,sBAAY;CAmC1D,CAAA;AAjCC;IADC,gCAAsB,EAAE;;6CACd;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;oDAAC;AAGhB;IADC,gBAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;2DAClB;AAI1B;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC9F,oBAAU,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;8BACtD,cAAI;mDAAC;AAIf;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC9F,oBAAU,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;8BACtD,cAAI;mDAAC;AAGf;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDAClB;AAGpB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CAC1B;AAGZ;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACpB;AAGlB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACnB;AAGnB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACf;AAGvB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDAClB;AAlCD,iBAAiB;IAFrC,gBAAM,EAAE;IACR,gBAAM,CAAC,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;GACb,iBAAiB,CAmCrC;kBAnCoB,iBAAiB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.migrationDevelop1687876131132 = void 0;
|
|
13
|
+
class migrationDevelop1687876131132 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'migrationDevelop1687876131132';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` ADD \`type\` varchar(255) NULL`);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` ADD \`body\` varchar(21844) NULL`);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
down(queryRunner) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
yield queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` DROP COLUMN \`body\``);
|
|
26
|
+
yield queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` DROP COLUMN \`type\``);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.migrationDevelop1687876131132 = migrationDevelop1687876131132;
|
|
31
|
+
//# sourceMappingURL=1687876131132-migration-develop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1687876131132-migration-develop.js","sourceRoot":"","sources":["../../src/migrations/1687876131132-migration-develop.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,6BAA6B;IAA1C;QACI,SAAI,GAAG,+BAA+B,CAAA;IAY1C,CAAC;IAVgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,4EAA4E,CAAC,CAAC;YACtG,MAAM,WAAW,CAAC,KAAK,CAAC,8EAA8E,CAAC,CAAC;QAC5G,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;YAC5F,MAAM,WAAW,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;QAChG,CAAC;KAAA;CAEJ;AAbD,sEAaC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.migrationDevelop011687877455406 = void 0;
|
|
13
|
+
class migrationDevelop011687877455406 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'migrationDevelop011687877455406';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` ADD \`custom_name\` varchar(255) NULL`);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`user_channel_api_key\` ADD \`channel_user_id\` int NULL`);
|
|
21
|
+
yield queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` ADD \`type\` varchar(255) NULL`);
|
|
22
|
+
yield queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` ADD \`body\` varchar(21844) NULL`);
|
|
23
|
+
yield queryRunner.query(`ALTER TABLE \`user_channel_api_key\` ADD CONSTRAINT \`FK_adc2206f21efb67f9f6425a4ce8\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
down(queryRunner) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
yield queryRunner.query(`ALTER TABLE \`user_channel_api_key\` DROP FOREIGN KEY \`FK_adc2206f21efb67f9f6425a4ce8\``);
|
|
29
|
+
yield queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` DROP COLUMN \`body\``);
|
|
30
|
+
yield queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` DROP COLUMN \`type\``);
|
|
31
|
+
yield queryRunner.query(`ALTER TABLE \`user_channel_api_key\` DROP COLUMN \`channel_user_id\``);
|
|
32
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` DROP COLUMN \`custom_name\``);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.migrationDevelop011687877455406 = migrationDevelop011687877455406;
|
|
37
|
+
//# sourceMappingURL=1687877455406-migration-develop_01.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1687877455406-migration-develop_01.js","sourceRoot":"","sources":["../../src/migrations/1687877455406-migration-develop_01.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,+BAA+B;IAA5C;QACI,SAAI,GAAG,iCAAiC,CAAA;IAkB5C,CAAC;IAhBgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,oEAAoE,CAAC,CAAC;YAC9F,MAAM,WAAW,CAAC,KAAK,CAAC,uEAAuE,CAAC,CAAC;YACjG,MAAM,WAAW,CAAC,KAAK,CAAC,4EAA4E,CAAC,CAAC;YACtG,MAAM,WAAW,CAAC,KAAK,CAAC,8EAA8E,CAAC,CAAC;YACxG,MAAM,WAAW,CAAC,KAAK,CAAC,sMAAsM,CAAC,CAAC;QACpO,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,0FAA0F,CAAC,CAAC;YACpH,MAAM,WAAW,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;YAC5F,MAAM,WAAW,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;YAC5F,MAAM,WAAW,CAAC,KAAK,CAAC,sEAAsE,CAAC,CAAC;YAChG,MAAM,WAAW,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;QACxF,CAAC;KAAA;CAEJ;AAnBD,0EAmBC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.migrationPreDevelop1687877967732 = void 0;
|
|
13
|
+
class migrationPreDevelop1687877967732 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'migrationPreDevelop1687877967732';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` ADD \`type\` varchar(255) NULL`);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` ADD \`body\` varchar(21844) NULL`);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
down(queryRunner) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
yield queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` DROP COLUMN \`body\``);
|
|
26
|
+
yield queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` DROP COLUMN \`type\``);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.migrationPreDevelop1687877967732 = migrationPreDevelop1687877967732;
|
|
31
|
+
//# sourceMappingURL=1687877967732-migration-pre-develop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1687877967732-migration-pre-develop.js","sourceRoot":"","sources":["../../src/migrations/1687877967732-migration-pre-develop.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,gCAAgC;IAA7C;QACI,SAAI,GAAG,kCAAkC,CAAA;IAY7C,CAAC;IAVgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,4EAA4E,CAAC,CAAC;YACtG,MAAM,WAAW,CAAC,KAAK,CAAC,8EAA8E,CAAC,CAAC;QAC5G,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;YAC5F,MAAM,WAAW,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;QAChG,CAAC;KAAA;CAEJ;AAbD,4EAaC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class migrationPreDevelopShopiffyConnection1687909776321 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.migrationPreDevelopShopiffyConnection1687909776321 = void 0;
|
|
13
|
+
class migrationPreDevelopShopiffyConnection1687909776321 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'migrationPreDevelopShopiffyConnection1687909776321';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` ADD \`shopify_connection_id\` int NULL`);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`shopify_connection\` ADD CONSTRAINT \`FK_9499974cf522429803e172a6276\` FOREIGN KEY (\`reseller_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
21
|
+
yield queryRunner.query(`ALTER TABLE \`shopify_connection\` ADD CONSTRAINT \`FK_98158a497be5c13a12fad50554a\` FOREIGN KEY (\`supplier_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
22
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` ADD CONSTRAINT \`FK_687a267ae83f576c002baf0198a\` FOREIGN KEY (\`shopify_connection_id\`) REFERENCES \`shopify_connection\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
down(queryRunner) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` DROP FOREIGN KEY \`FK_687a267ae83f576c002baf0198a\``);
|
|
28
|
+
yield queryRunner.query(`ALTER TABLE \`shopify_connection\` DROP FOREIGN KEY \`FK_98158a497be5c13a12fad50554a\``);
|
|
29
|
+
yield queryRunner.query(`ALTER TABLE \`shopify_connection\` DROP FOREIGN KEY \`FK_9499974cf522429803e172a6276\``);
|
|
30
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` DROP COLUMN \`shopify_connection_id\``);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.migrationPreDevelopShopiffyConnection1687909776321 = migrationPreDevelopShopiffyConnection1687909776321;
|
|
35
|
+
//# sourceMappingURL=1687909776321-migration-pre-develop-shopiffy-connection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1687909776321-migration-pre-develop-shopiffy-connection.js","sourceRoot":"","sources":["../../src/migrations/1687909776321-migration-pre-develop-shopiffy-connection.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,kDAAkD;IAA/D;QACI,SAAI,GAAG,oDAAoD,CAAA;IAgB/D,CAAC;IAdgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAC;YAC/F,MAAM,WAAW,CAAC,KAAK,CAAC,sLAAsL,CAAC,CAAC;YAChN,MAAM,WAAW,CAAC,KAAK,CAAC,sLAAsL,CAAC,CAAC;YAChN,MAAM,WAAW,CAAC,KAAK,CAAC,0MAA0M,CAAC,CAAC;QACxO,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,kFAAkF,CAAC,CAAC;YAC5G,MAAM,WAAW,CAAC,KAAK,CAAC,wFAAwF,CAAC,CAAC;YAClH,MAAM,WAAW,CAAC,KAAK,CAAC,wFAAwF,CAAC,CAAC;YAClH,MAAM,WAAW,CAAC,KAAK,CAAC,oEAAoE,CAAC,CAAC;QAClG,CAAC;KAAA;CAEJ;AAjBD,gHAiBC"}
|
|
@@ -1997,7 +1997,7 @@
|
|
|
1997
1997
|
"affectsGlobalScope": false
|
|
1998
1998
|
},
|
|
1999
1999
|
"../src/entity/shopifyconnection.ts": {
|
|
2000
|
-
"version": "
|
|
2000
|
+
"version": "2d341aba412c7ac2b2e8d68ecb3d486a4abd2778f252a7acb1a49bcd734c6208",
|
|
2001
2001
|
"signature": "deaaa620213450b2c981971e6fa519cb8e39ada9d97973a431bc95bcb877e4ea",
|
|
2002
2002
|
"affectsGlobalScope": false
|
|
2003
2003
|
},
|
|
@@ -2467,8 +2467,8 @@
|
|
|
2467
2467
|
"affectsGlobalScope": false
|
|
2468
2468
|
},
|
|
2469
2469
|
"../src/entity/channeluser.ts": {
|
|
2470
|
-
"version": "
|
|
2471
|
-
"signature": "
|
|
2470
|
+
"version": "b0dc6b7f59ef3c707d78881bf4af319adf64f88797279e3b8c6c210ff7b1f319",
|
|
2471
|
+
"signature": "b870b68450e7e05a422b832ac3c12c70e7f33ac82e3c490501ca8d9eec81fe9d",
|
|
2472
2472
|
"affectsGlobalScope": false
|
|
2473
2473
|
},
|
|
2474
2474
|
"../src/entity/userchannelapikey.ts": {
|
|
@@ -3311,6 +3311,26 @@
|
|
|
3311
3311
|
"signature": "6f95205c8ce4797dcda2e5ce8cb6baf56c27737ef4f8a982cf6ca0532a399318",
|
|
3312
3312
|
"affectsGlobalScope": false
|
|
3313
3313
|
},
|
|
3314
|
+
"../src/migrations/1687876131132-migration-develop.ts": {
|
|
3315
|
+
"version": "93bf2af343e7444b22bf44c804da4f2a0797fc91667e510a2990687d11417da7",
|
|
3316
|
+
"signature": "4533dec73e9edd01b0356ee7bafdf6a5400f202d499e1a6620eb71c403f4d3e4",
|
|
3317
|
+
"affectsGlobalScope": false
|
|
3318
|
+
},
|
|
3319
|
+
"../src/migrations/1687877455406-migration-develop_01.ts": {
|
|
3320
|
+
"version": "e80eb2eef137c55ec237479c4e6c7d6d4fbb884ddbddb6f84ec1ae98562c829c",
|
|
3321
|
+
"signature": "5aa5dff8d65036bfa6b7352e27ac784539d744ebe12207ba18614dcbd10c98ec",
|
|
3322
|
+
"affectsGlobalScope": false
|
|
3323
|
+
},
|
|
3324
|
+
"../src/migrations/1687877967732-migration-pre-develop.ts": {
|
|
3325
|
+
"version": "372f02b11a0dfadb13ea5dd995d1d8b90035c134e014b602372e4ea3e0b55a4a",
|
|
3326
|
+
"signature": "1168ab5463e2894f1040c4416e9004cf1f51e6c7fdcbd51dfff650925123e2d9",
|
|
3327
|
+
"affectsGlobalScope": false
|
|
3328
|
+
},
|
|
3329
|
+
"../src/migrations/1687909776321-migration-pre-develop-shopiffy-connection.ts": {
|
|
3330
|
+
"version": "dd54f4766ec421948f646efa83c76084f81973dd6773dbcef56bb3b1850b5b00",
|
|
3331
|
+
"signature": "f38b307c946937bfe7732722241a7267f6fbdebea7346e2e459d318339c9d27a",
|
|
3332
|
+
"affectsGlobalScope": false
|
|
3333
|
+
},
|
|
3314
3334
|
"../src/migrations/execute/index.ts": {
|
|
3315
3335
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3316
3336
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -5308,6 +5328,7 @@
|
|
|
5308
5328
|
"../src/entity/channel.ts",
|
|
5309
5329
|
"../src/entity/channelgroup.ts",
|
|
5310
5330
|
"../src/entity/channeluserproductsync.ts",
|
|
5331
|
+
"../src/entity/shopifyconnection.ts",
|
|
5311
5332
|
"../src/entity/user.ts"
|
|
5312
5333
|
],
|
|
5313
5334
|
"../src/entity/channeluserproductsync.ts": [
|
|
@@ -6165,6 +6186,18 @@
|
|
|
6165
6186
|
"../src/migrations/1687872767462-add-columns-template-endpoint.ts": [
|
|
6166
6187
|
"../node_modules/typeorm/index.d.ts"
|
|
6167
6188
|
],
|
|
6189
|
+
"../src/migrations/1687876131132-migration-develop.ts": [
|
|
6190
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6191
|
+
],
|
|
6192
|
+
"../src/migrations/1687877455406-migration-develop_01.ts": [
|
|
6193
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6194
|
+
],
|
|
6195
|
+
"../src/migrations/1687877967732-migration-pre-develop.ts": [
|
|
6196
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6197
|
+
],
|
|
6198
|
+
"../src/migrations/1687909776321-migration-pre-develop-shopiffy-connection.ts": [
|
|
6199
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6200
|
+
],
|
|
6168
6201
|
"../src/migrations/execute/index.ts": [
|
|
6169
6202
|
"../src/config/connect.ts"
|
|
6170
6203
|
],
|
|
@@ -8151,6 +8184,7 @@
|
|
|
8151
8184
|
"../src/entity/channel.ts",
|
|
8152
8185
|
"../src/entity/channelgroup.ts",
|
|
8153
8186
|
"../src/entity/channeluserproductsync.ts",
|
|
8187
|
+
"../src/entity/shopifyconnection.ts",
|
|
8154
8188
|
"../src/entity/user.ts"
|
|
8155
8189
|
],
|
|
8156
8190
|
"../src/entity/channeluserproductsync.ts": [
|
|
@@ -8874,6 +8908,18 @@
|
|
|
8874
8908
|
"../src/migrations/1687872767462-add-columns-template-endpoint.ts": [
|
|
8875
8909
|
"../node_modules/typeorm/index.d.ts"
|
|
8876
8910
|
],
|
|
8911
|
+
"../src/migrations/1687876131132-migration-develop.ts": [
|
|
8912
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8913
|
+
],
|
|
8914
|
+
"../src/migrations/1687877455406-migration-develop_01.ts": [
|
|
8915
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8916
|
+
],
|
|
8917
|
+
"../src/migrations/1687877967732-migration-pre-develop.ts": [
|
|
8918
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8919
|
+
],
|
|
8920
|
+
"../src/migrations/1687909776321-migration-pre-develop-shopiffy-connection.ts": [
|
|
8921
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8922
|
+
],
|
|
8877
8923
|
"../src/migrations/index.ts": [
|
|
8878
8924
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
8879
8925
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -9684,6 +9730,10 @@
|
|
|
9684
9730
|
"../src/migrations/1687235204409-channel_user.ts",
|
|
9685
9731
|
"../src/migrations/1687322723851-channel_apikey.ts",
|
|
9686
9732
|
"../src/migrations/1687872767462-add-columns-template-endpoint.ts",
|
|
9733
|
+
"../src/migrations/1687876131132-migration-develop.ts",
|
|
9734
|
+
"../src/migrations/1687877455406-migration-develop_01.ts",
|
|
9735
|
+
"../src/migrations/1687877967732-migration-pre-develop.ts",
|
|
9736
|
+
"../src/migrations/1687909776321-migration-pre-develop-shopiffy-connection.ts",
|
|
9687
9737
|
"../src/migrations/execute/index.ts",
|
|
9688
9738
|
"../src/migrations/index.ts",
|
|
9689
9739
|
"../src/repositories/index.ts",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reachu/database",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.85",
|
|
4
4
|
"description": "reachu-database",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"author": "reachu",
|
|
22
22
|
"license": "ISC",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@reachu/logger": "1.0.
|
|
25
|
-
"@reachu/utils": "1.0.
|
|
24
|
+
"@reachu/logger": "1.0.85",
|
|
25
|
+
"@reachu/utils": "1.0.85",
|
|
26
26
|
"dotenv": "8.0.0",
|
|
27
27
|
"express": "4.17.1",
|
|
28
28
|
"mysql2": "1.5.2",
|
|
@@ -12,6 +12,7 @@ import Channel from './Channel';
|
|
|
12
12
|
import ChannelGroup from './ChannelGroup';
|
|
13
13
|
import ChannelUserProductSync from './ChannelUserProductSync';
|
|
14
14
|
import User from './User';
|
|
15
|
+
import ShopifyConnection from './ShopifyConnection';
|
|
15
16
|
|
|
16
17
|
@Entity()
|
|
17
18
|
export default class ChannelUser extends AuditedModel {
|
|
@@ -47,4 +48,9 @@ export default class ChannelUser extends AuditedModel {
|
|
|
47
48
|
)
|
|
48
49
|
@JoinColumn()
|
|
49
50
|
channelUserProductSync: ChannelUserProductSync[];
|
|
51
|
+
|
|
52
|
+
@ManyToOne(() => ShopifyConnection, (shopifyConnection) => shopifyConnection.id, { nullable: true })
|
|
53
|
+
@JoinColumn()
|
|
54
|
+
shopifyConnection: ShopifyConnection;
|
|
55
|
+
|
|
50
56
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class migrationDevelop1687876131132 implements MigrationInterface {
|
|
4
|
+
name = 'migrationDevelop1687876131132'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` ADD \`type\` varchar(255) NULL`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` ADD \`body\` varchar(21844) NULL`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` DROP COLUMN \`body\``);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` DROP COLUMN \`type\``);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class migrationDevelop011687877455406 implements MigrationInterface {
|
|
4
|
+
name = 'migrationDevelop011687877455406'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` ADD \`custom_name\` varchar(255) NULL`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`user_channel_api_key\` ADD \`channel_user_id\` int NULL`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` ADD \`type\` varchar(255) NULL`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` ADD \`body\` varchar(21844) NULL`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE \`user_channel_api_key\` ADD CONSTRAINT \`FK_adc2206f21efb67f9f6425a4ce8\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
15
|
+
await queryRunner.query(`ALTER TABLE \`user_channel_api_key\` DROP FOREIGN KEY \`FK_adc2206f21efb67f9f6425a4ce8\``);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` DROP COLUMN \`body\``);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` DROP COLUMN \`type\``);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE \`user_channel_api_key\` DROP COLUMN \`channel_user_id\``);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` DROP COLUMN \`custom_name\``);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class migrationPreDevelop1687877967732 implements MigrationInterface {
|
|
4
|
+
name = 'migrationPreDevelop1687877967732'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` ADD \`type\` varchar(255) NULL`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` ADD \`body\` varchar(21844) NULL`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` DROP COLUMN \`body\``);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE \`endpoint_template_ecommerce\` DROP COLUMN \`type\``);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class migrationPreDevelopShopiffyConnection1687909776321 implements MigrationInterface {
|
|
4
|
+
name = 'migrationPreDevelopShopiffyConnection1687909776321'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` ADD \`shopify_connection_id\` int NULL`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`shopify_connection\` ADD CONSTRAINT \`FK_9499974cf522429803e172a6276\` FOREIGN KEY (\`reseller_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE \`shopify_connection\` ADD CONSTRAINT \`FK_98158a497be5c13a12fad50554a\` FOREIGN KEY (\`supplier_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` ADD CONSTRAINT \`FK_687a267ae83f576c002baf0198a\` FOREIGN KEY (\`shopify_connection_id\`) REFERENCES \`shopify_connection\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
14
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` DROP FOREIGN KEY \`FK_687a267ae83f576c002baf0198a\``);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE \`shopify_connection\` DROP FOREIGN KEY \`FK_98158a497be5c13a12fad50554a\``);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE \`shopify_connection\` DROP FOREIGN KEY \`FK_9499974cf522429803e172a6276\``);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` DROP COLUMN \`shopify_connection_id\``);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|