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

Add tables option to CLI generate entity #219

Merged

Conversation

Ka1wa
Copy link
Contributor

@Ka1wa Ka1wa commented Oct 3, 2021

I have a big database of which I only need a couple tables generated.

This PR introduces the tables option to the sea-orm-cli generate entity command as follows:

-t, --tables <TABLES>                      Generate entity file for specified tables only (comma seperated)

This allows me to do the following:
sea-orm-cli generate entity -o src/entity -t words,words_definitions

Finally I made the option conflict with the existing include-hidden-tables because that seemed most logical.

@tyt2y3
Copy link
Member

tyt2y3 commented Oct 3, 2021

Thank you for the contribution. Nicely done indeed.

@tyt2y3 tyt2y3 merged commit 700a020 into SeaQL:master Oct 4, 2021
@Ka1wa Ka1wa deleted the feature/cli-generate-entity-filter-tables branch October 5, 2021 01:13
@tyt2y3
Copy link
Member

tyt2y3 commented Oct 6, 2021

0.2.5

arpancodes pushed a commit to arpancodes/sea-orm that referenced this pull request Apr 8, 2022
…ix SeaQL#217 (SeaQL#219)

* Add failing tests

* Fix tests: add tbl_ prefix to Table wildcard method

* Fix typo in tests

* Make tests pass

* fix docs tests

* rename wildcard to asterisk
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.

None yet

2 participants