@bdkinc/knex-ibmi 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/cli.cjs +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -324,8 +324,9 @@ ibmi-migrations migrate:make <name> # Create new migration file
|
|
|
324
324
|
# Options:
|
|
325
325
|
ibmi-migrations migrate:status --env production
|
|
326
326
|
ibmi-migrations migrate:latest --knexfile ./config/knexfile.js
|
|
327
|
+
ibmi-migrations migrate:latest --knexfile ./knexfile.ts # Use TypeScript knexfile
|
|
327
328
|
ibmi-migrations migrate:make create_users_table
|
|
328
|
-
ibmi-migrations migrate:make add_email_column -x ts
|
|
329
|
+
ibmi-migrations migrate:make add_email_column -x ts # TypeScript migration
|
|
329
330
|
```
|
|
330
331
|
|
|
331
332
|
📖 **See [MIGRATIONS.md](./MIGRATIONS.md) for complete documentation**
|
package/dist/cli.cjs
CHANGED
|
@@ -255,6 +255,9 @@ function showHelp() {
|
|
|
255
255
|
console.log(
|
|
256
256
|
" --knexfile <file> - Specify knexfile path (default: ./knexfile.js)"
|
|
257
257
|
);
|
|
258
|
+
console.log(
|
|
259
|
+
" - Supports both .js and .ts knexfiles"
|
|
260
|
+
);
|
|
258
261
|
console.log(
|
|
259
262
|
" -x <extension> - File extension for new migrations (js|ts)"
|
|
260
263
|
);
|
|
@@ -264,6 +267,7 @@ function showHelp() {
|
|
|
264
267
|
console.log(" ibmi-migrations migrate:latest");
|
|
265
268
|
console.log(" ibmi-migrations migrate:rollback");
|
|
266
269
|
console.log(" ibmi-migrations migrate:status --env production");
|
|
270
|
+
console.log(" ibmi-migrations migrate:latest --knexfile knexfile.ts");
|
|
267
271
|
console.log(" ibmi-migrations migrate:make create_users_table");
|
|
268
272
|
console.log(" ibmi-migrations migrate:make add_email_to_users -x ts");
|
|
269
273
|
console.log(" ibmi-migrations latest --knexfile ./config/knexfile.js");
|
|
@@ -334,7 +338,7 @@ export const down = (knex) => {
|
|
|
334
338
|
`;
|
|
335
339
|
}
|
|
336
340
|
function getTsMigrationTemplate(migrationName) {
|
|
337
|
-
return `import { Knex } from "knex";
|
|
341
|
+
return `import type { Knex } from "knex";
|
|
338
342
|
|
|
339
343
|
export const up = async (knex: Knex): Promise<void> => {
|
|
340
344
|
// Add your migration logic here
|