also looking at this
fix(migrate)!: run the directories executeMigration was given
#1138
7 files
+348
-49
| @@ -211,7 +211,7 @@ describe('the runner tells authored migrations from generated ones', () => { | ||
| 211 | 211 | const authored = join(migrationsDir(), '9000000001-alter-farms-table.sql') |
| 212 | 212 | writeFileSync(authored, 'ALTER TABLE farms ADD COLUMN steward TEXT;\n') |
| 213 | 213 | |
| 214 | await executeMigration(modelsDir) | |
| 214 | await executeMigration() | |
| 215 | 215 | |
| 216 | 216 | expect(existsSync(authored)).toBe(true) |
| 217 | 217 | expect(columnsOf('farms')).toContain('steward') |
| @@ -221,7 +221,7 @@ describe('the runner tells authored migrations from generated ones', () => { | ||
| 221 | 221 | it('does not replay it on the next run, so it cannot fail as a duplicate', async () => { |
| 222 | 222 | // Recorded means run-once. Replaying an ADD COLUMN is the `duplicate |
| 223 | 223 | // column name` failure that takes a whole migrate run down with it. |
| 224 | await executeMigration(modelsDir) | |
| 224 | await executeMigration() | |
| 225 | 225 | |
| 226 | 226 | expect(existsSync(join(migrationsDir(), '9000000001-alter-farms-table.sql'))).toBe(true) |
| 227 | 227 | expect(columnsOf('farms')).toContain('steward') |
| @@ -234,7 +234,7 @@ describe('the runner tells authored migrations from generated ones', () => { | ||
| 234 | 234 | const generated = join(migrationsDir(), '9000000002-alter-farms-table.sql') |
| 235 | 235 | writeFileSync(generated, `${GENERATED_MARKER}\nALTER TABLE farms ADD COLUMN drainage TEXT;\n`) |
| 236 | 236 | |
| 237 | await executeMigration(modelsDir) | |
| 237 | await executeMigration() | |
| 238 | 238 | |
| 239 | 239 | expect(existsSync(generated)).toBe(true) |
| 240 | 240 | expect(columnsOf('farms')).toContain('drainage') |