@synconset/factory-girl-typeorm
Advanced tools
Comparing version 2.1.1 to 2.2.0
@@ -21,2 +21,5 @@ class TypeOrmAdapter { | ||
await manager.query('PRAGMA foreign_keys = OFF;'); | ||
} else if (this.connection.options.type === 'postgres') { | ||
await manager.query(`BEGIN; | ||
ALTER TABLE "${modelRepo.metadata.tableName}" DISABLE TRIGGER ALL;`); | ||
} else { | ||
@@ -28,2 +31,6 @@ await manager.query('SET FOREIGN_KEY_CHECKS=0;'); | ||
return manager.query('PRAGMA foreign_keys = ON;'); | ||
} else if (this.connection.options.type === 'postgres') { | ||
await manager.query(` | ||
ALTER TABLE "${modelRepo.metadata.tableName}" ENABLE TRIGGER ALL; | ||
COMMIT;`); | ||
} else { | ||
@@ -30,0 +37,0 @@ return manager.query('SET FOREIGN_KEY_CHECKS=1;'); |
{ | ||
"name": "@synconset/factory-girl-typeorm", | ||
"version": "2.1.1", | ||
"version": "2.2.0", | ||
"description": "Typeorm adapter for factory-girl", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3587
6
53