diff --git a/packages/cli/src/commands/database/alteration/index.test.ts b/packages/cli/src/commands/database/alteration/index.test.ts index 5584dcf83..4a2cc37bc 100644 --- a/packages/cli/src/commands/database/alteration/index.test.ts +++ b/packages/cli/src/commands/database/alteration/index.test.ts @@ -75,7 +75,7 @@ describe('chooseAlterationsByVersion()', () => { ), expect(chooseAlterationsByVersion(files, 'v1.1.0')).resolves.toEqual(files.slice(0, 8)), expect(chooseAlterationsByVersion(files, 'v1.2.0')).resolves.toEqual(files.slice(0, 9)), - expect(chooseAlterationsByVersion(files, 'next')).resolves.toEqual(files.slice(0, 11)), + expect(chooseAlterationsByVersion(files, 'next')).resolves.toEqual(files.slice(0, 12)), ]); }); }); diff --git a/packages/cli/src/commands/database/alteration/version.ts b/packages/cli/src/commands/database/alteration/version.ts index 21605a8ee..43d4695c5 100644 --- a/packages/cli/src/commands/database/alteration/version.ts +++ b/packages/cli/src/commands/database/alteration/version.ts @@ -32,7 +32,7 @@ export const chooseAlterationsByVersion = async ( log.info(`Deploy target ${chalk.green(nextTag)}`); - return alterations.slice(0, endIndex); + return alterations.slice(0, endIndex + 1); } const versions = alterations