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

Allow make:entity specify the table name #1626

Open
omgslinux opened this issue Dec 16, 2024 · 0 comments
Open

Allow make:entity specify the table name #1626

omgslinux opened this issue Dec 16, 2024 · 0 comments

Comments

@omgslinux
Copy link

It happens that though the default is to name the table to the lowercase entity name (i.e: Task-> task), it's not unusual that the table name could be "tasks" (i.e. in plural).

So, I can think of two ways for this:

  1. Just add an extra parameter where one can specifiy the table name

  2. Explicitily prompt for the table name, and in case it's the same as the entity name, you can skip using the ORM\Table attribute in the entity file. You can default to the same name or try to guess the plural, and offer it in the prompt.

There could be a third option, changing the current idea, and it's to directly insert the plural in the entity file, and maybe encourage to review if necessary.

Thanks in advance.

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

No branches or pull requests

1 participant