@loomcore/api 0.1.66 → 0.1.67
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.
|
@@ -56,7 +56,13 @@ export class MigrationRunner {
|
|
|
56
56
|
throw new Error(`❌ Migrations directory not found at: ${this.migrationsDir}`);
|
|
57
57
|
}
|
|
58
58
|
if (this.dbType === 'postgres') {
|
|
59
|
-
const pool = new Pool({
|
|
59
|
+
const pool = new Pool({
|
|
60
|
+
host: this.config.database.host,
|
|
61
|
+
user: this.config.database.username,
|
|
62
|
+
password: this.config.database.password,
|
|
63
|
+
port: this.config.database.port,
|
|
64
|
+
database: this.config.database.name
|
|
65
|
+
});
|
|
60
66
|
this.dbConnection = pool;
|
|
61
67
|
return new Umzug({
|
|
62
68
|
migrations: async () => {
|
|
@@ -158,7 +164,13 @@ export class MigrationRunner {
|
|
|
158
164
|
async wipeDatabase() {
|
|
159
165
|
console.log(`⚠️ Wiping ${this.dbType} database...`);
|
|
160
166
|
if (this.dbType === 'postgres') {
|
|
161
|
-
const pool = new Pool({
|
|
167
|
+
const pool = new Pool({
|
|
168
|
+
host: this.config.database.host,
|
|
169
|
+
user: this.config.database.username,
|
|
170
|
+
password: this.config.database.password,
|
|
171
|
+
port: this.config.database.port,
|
|
172
|
+
database: this.config.database.name
|
|
173
|
+
});
|
|
162
174
|
try {
|
|
163
175
|
await pool.query('DROP SCHEMA public CASCADE; CREATE SCHEMA public;');
|
|
164
176
|
}
|