also looking at this
fix(migrate)!: run the directories executeMigration was given
#1138
7 files
+348
-49
| @@ -231,12 +231,22 @@ const migration = await generateMigration('./models', { | ||
| 231 | 231 | |
| 232 | 232 | ### executeMigration |
| 233 | 233 | |
| 234 | Execute a migration. | |
| 234 | Run every pending migration file in the corpus and record each one. | |
| 235 | 235 | |
| 236 | 236 | ```typescript |
| 237 | 237 | import { executeMigration } from 'bun-query-builder' |
| 238 | 238 | |
| 239 | await executeMigration(migration) | |
| 239 | // The configured `migrationDir`. | |
| 240 | await executeMigration() | |
| 241 | ||
| 242 | // A corpus assembled from several directories — the application's own | |
| 243 | // migrations plus the ones each installed package ships. Files from every | |
| 244 | // directory are ordered together by file name, so names must be unique | |
| 245 | // across the whole run. | |
| 246 | await executeMigration([ | |
| 247 | './database/migrations', | |
| 248 | './node_modules/loghq/database/migrations', | |
| 249 | ]) | |
| 240 | 250 | ``` |
| 241 | 251 | |
| 242 | 252 | ## Seeders |