@cheetah.js/orm 0.1.32 → 0.1.34
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/bun/index.js +77 -74
- package/dist/bun/index.js.map +16 -16
- package/dist/driver/pg-driver.js +3 -1
- package/dist/driver/pg-driver.js.map +1 -1
- package/dist/migration/diff-calculator.js +4 -4
- package/dist/migration/diff-calculator.js.map +1 -1
- package/dist/migration/migrator.js +1 -1
- package/dist/migration/migrator.js.map +1 -1
- package/package.json +2 -2
package/dist/bun/index.js
CHANGED
|
@@ -218325,7 +218325,7 @@ var PROPERTIES_METADATA = "cheetah:properties:metadata";
|
|
|
218325
218325
|
var PROPERTIES_RELATIONS = "cheetah:properties:relations";
|
|
218326
218326
|
var EVENTS_METADATA = "cheetah:events:metadata";
|
|
218327
218327
|
|
|
218328
|
-
// /
|
|
218328
|
+
// ../../node_modules/balanced-match/index.jsodules/minimatch
|
|
218329
218329
|
var ProviderType;
|
|
218330
218330
|
(function(ProviderType2) {
|
|
218331
218331
|
ProviderType2["ROUTES"] = "routes";
|
|
@@ -218334,7 +218334,7 @@ var ProviderType;
|
|
|
218334
218334
|
ProviderType2["CONTROLLER"] = "controller";
|
|
218335
218335
|
})(ProviderType || (ProviderType = {}));
|
|
218336
218336
|
|
|
218337
|
-
// /
|
|
218337
|
+
// ../../node_modules/balanced-match/index.jsodules/minimatch/
|
|
218338
218338
|
var ProviderScope;
|
|
218339
218339
|
(function(ProviderScope2) {
|
|
218340
218340
|
ProviderScope2["REQUEST"] = "request";
|
|
@@ -218342,9 +218342,26 @@ var ProviderScope;
|
|
|
218342
218342
|
ProviderScope2["SINGLETON"] = "singleton";
|
|
218343
218343
|
})(ProviderScope || (ProviderScope = {}));
|
|
218344
218344
|
|
|
218345
|
+
// /export/htdocs/p/framework/packages/core/dist/domain/provider-type.js
|
|
218346
|
+
var ProviderType2;
|
|
218347
|
+
(function(ProviderType3) {
|
|
218348
|
+
ProviderType3["ROUTES"] = "routes";
|
|
218349
|
+
ProviderType3["SERVICE"] = "service";
|
|
218350
|
+
ProviderType3["PROVIDER"] = "provider";
|
|
218351
|
+
ProviderType3["CONTROLLER"] = "controller";
|
|
218352
|
+
})(ProviderType2 || (ProviderType2 = {}));
|
|
218353
|
+
|
|
218354
|
+
// /export/htdocs/p/framework/packages/core/dist/domain/provider-scope.js
|
|
218355
|
+
var ProviderScope2;
|
|
218356
|
+
(function(ProviderScope3) {
|
|
218357
|
+
ProviderScope3["REQUEST"] = "request";
|
|
218358
|
+
ProviderScope3["INSTANCE"] = "instance";
|
|
218359
|
+
ProviderScope3["SINGLETON"] = "singleton";
|
|
218360
|
+
})(ProviderScope2 || (ProviderScope2 = {}));
|
|
218361
|
+
|
|
218345
218362
|
// /export/htdocs/p/framework/packages/core/dist/domain/provider.js
|
|
218346
218363
|
class Provider {
|
|
218347
|
-
type =
|
|
218364
|
+
type = ProviderType2.PROVIDER;
|
|
218348
218365
|
deps = [];
|
|
218349
218366
|
instance;
|
|
218350
218367
|
_provide;
|
|
@@ -218352,7 +218369,7 @@ class Provider {
|
|
|
218352
218369
|
_useValue;
|
|
218353
218370
|
hooks;
|
|
218354
218371
|
path;
|
|
218355
|
-
scope =
|
|
218372
|
+
scope = ProviderScope2.SINGLETON;
|
|
218356
218373
|
children = [];
|
|
218357
218374
|
parent;
|
|
218358
218375
|
constructor(token, options = {}) {
|
|
@@ -218470,7 +218487,7 @@ class ProviderControl extends Map {
|
|
|
218470
218487
|
}
|
|
218471
218488
|
}
|
|
218472
218489
|
createIfNotExists(key, options) {
|
|
218473
|
-
const type = options.type ||
|
|
218490
|
+
const type = options.type || ProviderType2.PROVIDER;
|
|
218474
218491
|
if (!this.has(key)) {
|
|
218475
218492
|
const { model = Provider } = this.settings.get(type) || {};
|
|
218476
218493
|
const item = new model(key, options);
|
|
@@ -218487,9 +218504,9 @@ function registerProvider(provider3) {
|
|
|
218487
218504
|
}
|
|
218488
218505
|
return GlobalProvider.merge(provider3.provide, provider3);
|
|
218489
218506
|
}
|
|
218490
|
-
GlobalProvider.createRegistry(
|
|
218491
|
-
GlobalProvider.createRegistry(
|
|
218492
|
-
var registerController = GlobalProvider.createRegisterFn(
|
|
218507
|
+
GlobalProvider.createRegistry(ProviderType2.CONTROLLER, Provider);
|
|
218508
|
+
GlobalProvider.createRegistry(ProviderType2.ROUTES, Provider);
|
|
218509
|
+
var registerController = GlobalProvider.createRegisterFn(ProviderType2.CONTROLLER);
|
|
218493
218510
|
// /export/htdocs/p/framework/packages/core/node_modules/globby/index.js
|
|
218494
218511
|
var import_merge2 = __toESM(require_merge2(), 1);
|
|
218495
218512
|
var import_fast_glob2 = __toESM(require_out4(), 1);
|
|
@@ -221448,7 +221465,7 @@ var InjectorService = InjectorService_1 = class InjectorService2 {
|
|
|
221448
221465
|
resolveControllers() {
|
|
221449
221466
|
if (!this.settings)
|
|
221450
221467
|
return {};
|
|
221451
|
-
const controllers = GlobalProvider.getByType(
|
|
221468
|
+
const controllers = GlobalProvider.getByType(ProviderType2.CONTROLLER).filter((controller2) => !controller2.isChild());
|
|
221452
221469
|
let hydrateRoute = new Map;
|
|
221453
221470
|
for (const controller2 of controllers) {
|
|
221454
221471
|
let routes = Metadata.get(CONTROLLER_ROUTES, controller2.token);
|
|
@@ -221573,18 +221590,18 @@ var InjectorService = InjectorService_1 = class InjectorService2 {
|
|
|
221573
221590
|
construct = (deps2) => new provider3.useClass(...deps2);
|
|
221574
221591
|
let instance;
|
|
221575
221592
|
if (isRequestScope(provider3, deps, this)) {
|
|
221576
|
-
scope =
|
|
221593
|
+
scope = ProviderScope2.REQUEST;
|
|
221577
221594
|
}
|
|
221578
221595
|
let services = [];
|
|
221579
221596
|
if (!provider3.useValue)
|
|
221580
221597
|
services = deps.filter((t) => !isPrimitiveType(t)).map((token) => this.invoke(getClassOrSymbol(token), locals));
|
|
221581
221598
|
instance = construct(services);
|
|
221582
221599
|
switch (scope) {
|
|
221583
|
-
case
|
|
221600
|
+
case ProviderScope2.SINGLETON:
|
|
221584
221601
|
provider3.instance = instance;
|
|
221585
221602
|
this.container.addProvider(provider3.token, provider3);
|
|
221586
221603
|
break;
|
|
221587
|
-
case
|
|
221604
|
+
case ProviderScope2.REQUEST:
|
|
221588
221605
|
const clone = provider3.clone();
|
|
221589
221606
|
clone.instance = instance;
|
|
221590
221607
|
locals.set(clone.token, clone);
|
|
@@ -221599,7 +221616,7 @@ var InjectorService = InjectorService_1 = class InjectorService2 {
|
|
|
221599
221616
|
async invokeMethod(instance, methodName, locals, context) {
|
|
221600
221617
|
const cachedMethod = this.historyMethods.get(instance);
|
|
221601
221618
|
let methodInfo;
|
|
221602
|
-
if (cachedMethod) {
|
|
221619
|
+
if (cachedMethod && cachedMethod[methodName]) {
|
|
221603
221620
|
methodInfo = cachedMethod[methodName];
|
|
221604
221621
|
} else {
|
|
221605
221622
|
methodInfo = this.cacheMethodInfo(instance, methodName);
|
|
@@ -221636,7 +221653,7 @@ var InjectorService = InjectorService_1 = class InjectorService2 {
|
|
|
221636
221653
|
return methodInfo;
|
|
221637
221654
|
}
|
|
221638
221655
|
scopeOf(provider3) {
|
|
221639
|
-
return provider3.scope ||
|
|
221656
|
+
return provider3.scope || ProviderScope2.SINGLETON;
|
|
221640
221657
|
}
|
|
221641
221658
|
getConstructorDependencies(target, propertyKey) {
|
|
221642
221659
|
return Metadata.getOwn("override:ctor:design:paramtypes", target, propertyKey) || [...Metadata.getParamTypes(target, propertyKey)];
|
|
@@ -221777,7 +221794,7 @@ var Context = Context_1 = class Context2 {
|
|
|
221777
221794
|
}
|
|
221778
221795
|
};
|
|
221779
221796
|
Context = Context_1 = __decorate2([
|
|
221780
|
-
Injectable({ scope:
|
|
221797
|
+
Injectable({ scope: ProviderScope2.REQUEST }),
|
|
221781
221798
|
__metadata("design:paramtypes", [])
|
|
221782
221799
|
], Context);
|
|
221783
221800
|
// /export/htdocs/p/framework/packages/core/dist/domain/LocalsContainer.js
|
|
@@ -222164,7 +222181,7 @@ function isRequestScope(provider4, deps, injector) {
|
|
|
222164
222181
|
const depProvider = injector.get(dep);
|
|
222165
222182
|
if (!depProvider)
|
|
222166
222183
|
return false;
|
|
222167
|
-
return depProvider.scope ===
|
|
222184
|
+
return depProvider.scope === ProviderScope2.REQUEST;
|
|
222168
222185
|
});
|
|
222169
222186
|
}
|
|
222170
222187
|
// /export/htdocs/p/framework/packages/core/dist/utils/nameOf.js
|
|
@@ -222340,43 +222357,9 @@ LoggerService = __decorate4([
|
|
|
222340
222357
|
Service(),
|
|
222341
222358
|
__metadata3("design:paramtypes", [InjectorService])
|
|
222342
222359
|
], LoggerService);
|
|
222343
|
-
// ../../node_modules/balanced-match/
|
|
222344
|
-
function Entity(options) {
|
|
222345
|
-
return (target) => {
|
|
222346
|
-
const entities = Metadata.get(ENTITIES, Reflect) || [];
|
|
222347
|
-
entities.push({ target, options });
|
|
222348
|
-
Metadata.set(ENTITIES, entities, Reflect);
|
|
222349
|
-
};
|
|
222350
|
-
}
|
|
222351
|
-
// ../../node_m
|
|
222352
|
-
function getDefaultLength(type) {
|
|
222353
|
-
return null;
|
|
222354
|
-
}
|
|
222355
|
-
function toSnakeCase(propertyKey1) {
|
|
222356
|
-
propertyKey1 = propertyKey1[0].toLowerCase() + propertyKey1.slice(1);
|
|
222357
|
-
return propertyKey1.replace(/([A-Z])/g, "_$1").toLowerCase();
|
|
222358
|
-
}
|
|
222359
|
-
|
|
222360
|
-
// ../../node_modules/balanced-match/index.jsodules/minimatch
|
|
222361
|
-
var ProviderType2;
|
|
222362
|
-
(function(ProviderType3) {
|
|
222363
|
-
ProviderType3["ROUTES"] = "routes";
|
|
222364
|
-
ProviderType3["SERVICE"] = "service";
|
|
222365
|
-
ProviderType3["PROVIDER"] = "provider";
|
|
222366
|
-
ProviderType3["CONTROLLER"] = "controller";
|
|
222367
|
-
})(ProviderType2 || (ProviderType2 = {}));
|
|
222368
|
-
|
|
222369
|
-
// ../../node_modules/balanced-match/index.jsodules/minimatch/
|
|
222370
|
-
var ProviderScope2;
|
|
222371
|
-
(function(ProviderScope3) {
|
|
222372
|
-
ProviderScope3["REQUEST"] = "request";
|
|
222373
|
-
ProviderScope3["INSTANCE"] = "instance";
|
|
222374
|
-
ProviderScope3["SINGLETON"] = "singleton";
|
|
222375
|
-
})(ProviderScope2 || (ProviderScope2 = {}));
|
|
222376
|
-
|
|
222377
222360
|
// ../../node_modules/balanced-match/index.jsodules/mini
|
|
222378
222361
|
class Provider2 {
|
|
222379
|
-
type =
|
|
222362
|
+
type = ProviderType.PROVIDER;
|
|
222380
222363
|
deps = [];
|
|
222381
222364
|
instance;
|
|
222382
222365
|
_provide;
|
|
@@ -222384,7 +222367,7 @@ class Provider2 {
|
|
|
222384
222367
|
_useValue;
|
|
222385
222368
|
hooks;
|
|
222386
222369
|
path;
|
|
222387
|
-
scope =
|
|
222370
|
+
scope = ProviderScope.SINGLETON;
|
|
222388
222371
|
children = [];
|
|
222389
222372
|
parent;
|
|
222390
222373
|
constructor(token, options = {}) {
|
|
@@ -222502,7 +222485,7 @@ class ProviderControl5 extends Map {
|
|
|
222502
222485
|
}
|
|
222503
222486
|
}
|
|
222504
222487
|
createIfNotExists(key, options) {
|
|
222505
|
-
const type = options.type ||
|
|
222488
|
+
const type = options.type || ProviderType.PROVIDER;
|
|
222506
222489
|
if (!this.has(key)) {
|
|
222507
222490
|
const { model = Provider2 } = this.settings.get(type) || {};
|
|
222508
222491
|
const item = new model(key, options);
|
|
@@ -222513,9 +222496,9 @@ class ProviderControl5 extends Map {
|
|
|
222513
222496
|
}
|
|
222514
222497
|
var GlobalProvider2 = new ProviderControl5;
|
|
222515
222498
|
// ../../node_modules/balanced-match/index.jsodules/minimatch/dist/cjs/unesc
|
|
222516
|
-
GlobalProvider2.createRegistry(
|
|
222517
|
-
GlobalProvider2.createRegistry(
|
|
222518
|
-
var registerController2 = GlobalProvider2.createRegisterFn(
|
|
222499
|
+
GlobalProvider2.createRegistry(ProviderType.CONTROLLER, Provider2);
|
|
222500
|
+
GlobalProvider2.createRegistry(ProviderType.ROUTES, Provider2);
|
|
222501
|
+
var registerController2 = GlobalProvider2.createRegisterFn(ProviderType.CONTROLLER);
|
|
222519
222502
|
// /export/htdocs/p/framework/node_modules/globby/index.js
|
|
222520
222503
|
var import_merge22 = __toESM(require_merge2(), 1);
|
|
222521
222504
|
var import_fast_glob4 = __toESM(require_out4(), 1);
|
|
@@ -223144,7 +223127,7 @@ var InjectorService5 = InjectorService_12 = class InjectorService6 {
|
|
|
223144
223127
|
resolveControllers() {
|
|
223145
223128
|
if (!this.settings)
|
|
223146
223129
|
return {};
|
|
223147
|
-
const controllers = GlobalProvider.getByType(
|
|
223130
|
+
const controllers = GlobalProvider.getByType(ProviderType2.CONTROLLER).filter((controller3) => !controller3.isChild());
|
|
223148
223131
|
let hydrateRoute = new Map;
|
|
223149
223132
|
for (const controller3 of controllers) {
|
|
223150
223133
|
let routes = Metadata.get(CONTROLLER_ROUTES, controller3.token);
|
|
@@ -223269,16 +223252,16 @@ var InjectorService5 = InjectorService_12 = class InjectorService6 {
|
|
|
223269
223252
|
construct = (deps2) => provider6.useValue;
|
|
223270
223253
|
let instance;
|
|
223271
223254
|
if (isRequestScope(provider6, deps, this)) {
|
|
223272
|
-
scope =
|
|
223255
|
+
scope = ProviderScope2.REQUEST;
|
|
223273
223256
|
}
|
|
223274
223257
|
const services = deps.filter((t) => !isPrimitiveType(t)).map((token) => this.invoke(getClassOrSymbol(token), locals));
|
|
223275
223258
|
instance = construct(services);
|
|
223276
223259
|
switch (scope) {
|
|
223277
|
-
case
|
|
223260
|
+
case ProviderScope2.SINGLETON:
|
|
223278
223261
|
provider6.instance = instance;
|
|
223279
223262
|
this.container.addProvider(provider6.token, provider6);
|
|
223280
223263
|
break;
|
|
223281
|
-
case
|
|
223264
|
+
case ProviderScope2.REQUEST:
|
|
223282
223265
|
const clone = provider6.clone();
|
|
223283
223266
|
clone.instance = instance;
|
|
223284
223267
|
locals.set(clone.token, clone);
|
|
@@ -223330,7 +223313,7 @@ var InjectorService5 = InjectorService_12 = class InjectorService6 {
|
|
|
223330
223313
|
return methodInfo;
|
|
223331
223314
|
}
|
|
223332
223315
|
scopeOf(provider6) {
|
|
223333
|
-
return provider6.scope ||
|
|
223316
|
+
return provider6.scope || ProviderScope2.SINGLETON;
|
|
223334
223317
|
}
|
|
223335
223318
|
getConstructorDependencies(target, propertyKey) {
|
|
223336
223319
|
return Metadata.getOwn("override:ctor:design:paramtypes", target, propertyKey) || [...Metadata.getParamTypes(target, propertyKey)];
|
|
@@ -223466,7 +223449,7 @@ var Context4 = Context_12 = class Context5 {
|
|
|
223466
223449
|
}
|
|
223467
223450
|
};
|
|
223468
223451
|
Context4 = Context_12 = __decorate6([
|
|
223469
|
-
Injectable({ scope:
|
|
223452
|
+
Injectable({ scope: ProviderScope2.REQUEST }),
|
|
223470
223453
|
__metadata4("design:paramtypes", [])
|
|
223471
223454
|
], Context4);
|
|
223472
223455
|
// ../../node_modules/balanced-match/index.jsodules/mini
|
|
@@ -223778,10 +223761,27 @@ LoggerService3 = __decorate8([
|
|
|
223778
223761
|
Service(),
|
|
223779
223762
|
__metadata6("design:paramtypes", [InjectorService])
|
|
223780
223763
|
], LoggerService3);
|
|
223764
|
+
// ../../node_modules/balanced-match/
|
|
223765
|
+
function Entity(options) {
|
|
223766
|
+
return (target) => {
|
|
223767
|
+
const entities = Metadata3.get(ENTITIES, Reflect) || [];
|
|
223768
|
+
entities.push({ target, options });
|
|
223769
|
+
Metadata3.set(ENTITIES, entities, Reflect);
|
|
223770
|
+
};
|
|
223771
|
+
}
|
|
223772
|
+
// ../../node_m
|
|
223773
|
+
function getDefaultLength(type) {
|
|
223774
|
+
return null;
|
|
223775
|
+
}
|
|
223776
|
+
function toSnakeCase(propertyKey1) {
|
|
223777
|
+
propertyKey1 = propertyKey1[0].toLowerCase() + propertyKey1.slice(1);
|
|
223778
|
+
return propertyKey1.replace(/([A-Z])/g, "_$1").toLowerCase();
|
|
223779
|
+
}
|
|
223780
|
+
|
|
223781
223781
|
// ../../node_modules/balanced-match
|
|
223782
223782
|
function Index(options) {
|
|
223783
223783
|
return (target, propertyKey) => {
|
|
223784
|
-
const indexes =
|
|
223784
|
+
const indexes = Metadata.get("indexes", target.constructor) || [];
|
|
223785
223785
|
let index;
|
|
223786
223786
|
if (options && options.properties) {
|
|
223787
223787
|
const properties = options.properties;
|
|
@@ -223790,7 +223790,7 @@ function Index(options) {
|
|
|
223790
223790
|
index = { name: `${propertyKey}_index`, properties: [propertyKey] };
|
|
223791
223791
|
}
|
|
223792
223792
|
indexes.push(index);
|
|
223793
|
-
|
|
223793
|
+
Metadata.set("indexes", indexes, target.constructor);
|
|
223794
223794
|
};
|
|
223795
223795
|
}
|
|
223796
223796
|
|
|
@@ -225262,9 +225262,10 @@ class PgDriver {
|
|
|
225262
225262
|
}
|
|
225263
225263
|
async index(tableName, options) {
|
|
225264
225264
|
const schema = options && options.schema || "public";
|
|
225265
|
-
|
|
225265
|
+
let result = await this.client.query(`SELECT indexname AS index_name, indexdef AS column_name, tablename AS table_name
|
|
225266
225266
|
FROM pg_indexes
|
|
225267
225267
|
WHERE tablename = '${tableName}' AND schemaname = '${schema}'`);
|
|
225268
|
+
result.rows = result.rows.filter((row) => row.index_name.includes("_pkey") || !row.column_name.includes("UNIQUE INDEX"));
|
|
225268
225269
|
return result.rows.map((row) => {
|
|
225269
225270
|
return {
|
|
225270
225271
|
table: tableName,
|
|
@@ -226718,7 +226719,7 @@ class DiffCalculator {
|
|
|
226718
226719
|
const colT = entityCol.isEnum ? { type: "USER-DEFINED", len: null } : this.convertEntityTypeToSqlType(entityCol.type);
|
|
226719
226720
|
const colType = colT.type;
|
|
226720
226721
|
const length = entityCol.length ?? colT.len;
|
|
226721
|
-
if (bdCol.type
|
|
226722
|
+
if (!bdCol.type.includes(colType) || bdCol.length !== length) {
|
|
226722
226723
|
if (colType === "USER-DEFINED") {
|
|
226723
226724
|
colDiffs.push({
|
|
226724
226725
|
actionType: "DELETE",
|
|
@@ -226824,13 +226825,13 @@ class DiffCalculator {
|
|
|
226824
226825
|
case "varchar":
|
|
226825
226826
|
return { type: "character varying", len: 255 };
|
|
226826
226827
|
case "Boolean":
|
|
226827
|
-
return { type: "boolean" };
|
|
226828
|
+
return { type: "boolean", len: null };
|
|
226828
226829
|
case "Date":
|
|
226829
226830
|
return { type: "timestamp" };
|
|
226830
226831
|
case "Object":
|
|
226831
|
-
return { type: "json" };
|
|
226832
|
+
return { type: "json", len: null };
|
|
226832
226833
|
case "uuid":
|
|
226833
|
-
return { type: "uuid" };
|
|
226834
|
+
return { type: "uuid", len: null };
|
|
226834
226835
|
case "text":
|
|
226835
226836
|
return { type: "text" };
|
|
226836
226837
|
default:
|
|
@@ -227072,6 +227073,7 @@ class Migrator {
|
|
|
227072
227073
|
if (colDiff.colChanges.unique) {
|
|
227073
227074
|
sqlInstructions.push(this.orm.driverInstance.getAddUniqueConstraint(schema, tableName, colName));
|
|
227074
227075
|
} else {
|
|
227076
|
+
sqlInstructions.push(this.orm.driverInstance.getDropConstraint({ name: `${tableName}_${colName}_key` }, schema, tableName));
|
|
227075
227077
|
}
|
|
227076
227078
|
}
|
|
227077
227079
|
if (colDiff.colChanges.nullable !== undefined) {
|
|
@@ -227229,7 +227231,7 @@ class DiffCalculator2 {
|
|
|
227229
227231
|
const colT = entityCol.isEnum ? { type: "USER-DEFINED", len: null } : this.convertEntityTypeToSqlType(entityCol.type);
|
|
227230
227232
|
const colType = colT.type;
|
|
227231
227233
|
const length = entityCol.length ?? colT.len;
|
|
227232
|
-
if (bdCol.type
|
|
227234
|
+
if (!bdCol.type.includes(colType) || bdCol.length !== length) {
|
|
227233
227235
|
if (colType === "USER-DEFINED") {
|
|
227234
227236
|
colDiffs.push({
|
|
227235
227237
|
actionType: "DELETE",
|
|
@@ -227335,13 +227337,13 @@ class DiffCalculator2 {
|
|
|
227335
227337
|
case "varchar":
|
|
227336
227338
|
return { type: "character varying", len: 255 };
|
|
227337
227339
|
case "Boolean":
|
|
227338
|
-
return { type: "boolean" };
|
|
227340
|
+
return { type: "boolean", len: null };
|
|
227339
227341
|
case "Date":
|
|
227340
227342
|
return { type: "timestamp" };
|
|
227341
227343
|
case "Object":
|
|
227342
|
-
return { type: "json" };
|
|
227344
|
+
return { type: "json", len: null };
|
|
227343
227345
|
case "uuid":
|
|
227344
|
-
return { type: "uuid" };
|
|
227346
|
+
return { type: "uuid", len: null };
|
|
227345
227347
|
case "text":
|
|
227346
227348
|
return { type: "text" };
|
|
227347
227349
|
default:
|
|
@@ -227583,6 +227585,7 @@ class Migrator2 {
|
|
|
227583
227585
|
if (colDiff.colChanges.unique) {
|
|
227584
227586
|
sqlInstructions.push(this.orm.driverInstance.getAddUniqueConstraint(schema, tableName, colName));
|
|
227585
227587
|
} else {
|
|
227588
|
+
sqlInstructions.push(this.orm.driverInstance.getDropConstraint({ name: `${tableName}_${colName}_key` }, schema, tableName));
|
|
227586
227589
|
}
|
|
227587
227590
|
}
|
|
227588
227591
|
if (colDiff.colChanges.nullable !== undefined) {
|
|
@@ -227630,4 +227633,4 @@ export {
|
|
|
227630
227633
|
AfterCreate
|
|
227631
227634
|
};
|
|
227632
227635
|
|
|
227633
|
-
//# debugId=
|
|
227636
|
+
//# debugId=0601C8B41D18B46364756e2164756e21
|