Closed josebailo closed 1 year ago
When using Typescript, the interface IAlterQuery force you to set add, drop, and modify properties when altering a table even if you don't need them. I think would be a good idea make them optionally.
IAlterQuery
Alter the interface from this:
export interface IAlterQuery { [version: number]: { add: TColumns; drop: TColumns; modify: TColumns; }; }
To this:
export interface IAlterQuery { [version: number]: { add?: TColumns; drop?: TColumns; modify?: TColumns; }; }
This way you could write an alter with just the things you need to add.
Ok gotcha. It would be great if you can rise a PR - you have already figured out what to do :). I will just copy paste your code lol :rofl:
fixed in v - 4.5.6
Summary
When using Typescript, the interface
IAlterQuery
force you to set add, drop, and modify properties when altering a table even if you don't need them. I think would be a good idea make them optionally.Basic example
Alter the interface from this:
To this:
Motivation
This way you could write an alter with just the things you need to add.