Skip to content

Commit

Permalink
Fixed passing autoMigration params to the collection
Browse files Browse the repository at this point in the history
  • Loading branch information
oskardudycz committed Oct 8, 2024
1 parent f0fb555 commit 391d7e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/packages/pongo/src/e2e/postgres.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ void describe('MongoDB Compatibility Tests', () => {
before(async () => {
postgres = await new PostgreSqlContainer().start();
postgresConnectionString = postgres.getConnectionUri();
client = pongoClient(postgresConnectionString);
client = pongoClient(postgresConnectionString, {
schema: { autoMigration: 'None' },
});
shim = new MongoClient(postgresConnectionString);
await client.connect();
await shim.connect();
Expand Down
4 changes: 2 additions & 2 deletions src/packages/pongo/src/postgres/dbClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export const postgresDb = (
db,
pool,
sqlBuilder: postgresSQLBuilder(collectionName),
...(options.schema ? options.schema : {}),
...(options.errors ? options.errors : {}),
schema: options.schema ? options.schema : {},
errors: options.errors ? options.errors : {},
}),
transaction: () => pool.transaction(),
withTransaction: (handle) => pool.withTransaction(handle),
Expand Down

0 comments on commit 391d7e1

Please sign in to comment.