Update migration, move test file

Signed-off-by: Tim Hansen <timbonicush@spotify.com>
This commit is contained in:
Tim Hansen
2024-07-16 17:41:09 -04:00
parent d160ce8925
commit df17af74d6
4 changed files with 8 additions and 10 deletions
@@ -31,6 +31,10 @@ exports.up = async function up(knex) {
* @returns { Promise<void> }
*/
exports.down = async function down(knex) {
await knex
.delete()
.from('backstage_backend_tasks__tasks')
.where({ next_run_start_at: null });
await knex.schema.alterTable('backstage_backend_tasks__tasks', table => {
table.dropNullable('next_run_start_at');
});
@@ -107,11 +107,6 @@ describe('migrations', () => {
},
]);
await knex
.delete()
.from('backstage_backend_tasks__tasks')
.where({ next_run_start_at: null });
await migrateDownOnce(knex);
await expect(
@@ -31,6 +31,10 @@ exports.up = async function up(knex) {
* @returns { Promise<void> }
*/
exports.down = async function down(knex) {
await knex
.delete()
.from('backstage_backend_tasks__tasks')
.where({ next_run_start_at: null });
await knex.schema.alterTable('backstage_backend_tasks__tasks', table => {
table.dropNullable('next_run_start_at');
});
@@ -107,11 +107,6 @@ describe('migrations', () => {
},
]);
await knex
.delete()
.from('backstage_backend_tasks__tasks')
.where({ next_run_start_at: null });
await migrateDownOnce(knex);
await expect(