Closed nickreese closed 4 years ago
I need to fork this to handle some of my own issues.
That said, this issue is easily fixed in changing MigrationsReadable.ts:
From:
export const nameParts = (name: string): string[] => name.split('_', 2);
To:
export const nameParts = (name: string): string[] => {
const [first, ...rest] = name.split('_');
return [first, rest.join("_")]
}
Yeah noticed that one recently too. If you make a PR would love to merge it! Put credit where credit is due :)
@ivank Unfortunately I forked the project to rename the files created to .sql instead of .pgsql and am not sure how to do a pull request just with a single file or refork it. No problem if you merge it without any credit.
Thanks for your great work. Small detail, really not important but figured it was worth logging somewhere.
I've got a single migration: 2020-03-06T22:16:39.659Z_update_date.pgsql
console.log returns =>
[ { id: '2020-03-06T22:16:39.659Z', name: 'update', content: '' } ]
I've done this a few times and it never fully parses. Minimal, but worth noting.