-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Remove default tablePrefix tbl_ from db\Connection #2911
Comments
Agree. Following this logic, we could also prefix all columns with |
It stems back from having to tell the difference easily in a console envo between tables and other elements in a list, i.e. views. |
Honestly, I've only seen them in a Yii 1 extension and it was - let's say - a bit uncomfortable. A good summary is given here IMHO http:https://stackoverflow.com/questions/324163/should-we-use-prefixes-in-our-database-table-naming-conventions I looked also for tbl_ table prefix on Google ... must be a Yii thing, 3 of the first 5 answers are Yii related 😄 |
Hmm maybe it is something that can be removed, I have just always been On 28 March 2014 16:44, Tobias Munk [email protected] wrote:
|
i dont like it too having tbl prefix but there is a good reason too in my opinion.. when i see |
That is one thing too, I had two apps that pointed to the same db (partially rewritten in Yii1 at the time) and tbl did tell me the difference between old and new. |
I still see no really convincing argument why this should be default. This is a kind of hungarian notation. But we don't use this anywhere else so what exactly makes table names so special that we would need it there? We should aim for simple and human readable names by default. If someone really thinks, he prefers to have the |
Yeah it does seem sane to do that |
@samdark You could just move this setting to the apps. |
You mean advanced app? |
Yes, basic app also, if it has a db connection. |
I'm fine removing the prefix. If we do so, the apps should not use prefix either for consistency. Can someone prepare a PR for this? All occurrence of |
so how then use prefix ? i know some projects including |
@Ragazzo It won't get removed. It's just the default value that will be changed. You can always configure a table prefix in your 'db' => [
...
'tablePrefix' => 'tbl_',
] |
Ok ) |
I'll create a pull request if noone has started it. |
I haven't so far. |
I haven't |
Fixes #2911: Removed `tbl_` default for table prefix
Why should we have such a default?
And if, because of some reasons yet unknown to me, I'd say it should be named
app_
.The text was updated successfully, but these errors were encountered: