You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling addConstraint, using an object as the second parameter causes a TypeScript error:
TS2345: Argument of type '{ check: string; }' is not assignable to parameter of type 'string'.
This was presumably introduced in #1129 when a union type seems to have been accidentally refactored into an intersection type (diff).
Steps to reproduce
Create a TypeScript migration:
import{typeMigrationBuilder}from'node-pg-migrate';exportfunctionup(pgm: MigrationBuilder): void{pgm.createTable('my_table',{my_column: {type: 'VARCHAR(255)',},});pgm.createConstraint('my_table','my_column',{check: 'my_column IS NOT NULL'});}
Describe the bug
When calling
addConstraint
, using an object as the second parameter causes a TypeScript error:This was presumably introduced in #1129 when a union type seems to have been accidentally refactored into an intersection type (diff).
Steps to reproduce
Create a TypeScript migration:
Logs
No response
System Info
Used Module System
cjs
The text was updated successfully, but these errors were encountered: