Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(): orm cli arguments for create and drop #297

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexdeia
Copy link

Hi. Fixes for couple of issues with package scripts.

  1. migration:create - redundant -d flag
typeorm-ts-node-esm migration:create <path>

Creates a new migration file.

Options:
  -h, --help       Show help                                           [boolean]
  -o, --outputJs   Generate a migration file on Javascript instead of Typescript
                                                      [boolean] [default: false]
  -t, --timestamp  Custom timestamp for the migration name
                                                       [number] [default: false]
  -v, --version    Show version number                                 [boolean]

Unknown argument: d
  1. migration:drop - missed -d flag
Drops all tables in the database on your default dataSource. To drop table of a
concrete connection's database use -c option.

Options:
  -h, --help        Show help                                          [boolean]
  -d, --dataSource  Path to the file where your DataSource instance is defined.
                                                                      [required]
  -v, --version     Show version number                                [boolean]

Missing required argument: dataSource

@mohammedalbehairy
Copy link

This fix works fine but now you will be forced to add the path of the migration file each time, And this shouldn't be done ,It should read the path directly from ormconfig file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants