Default Table Prefixes

I’m just starting a new application in Yii 2 and using the Advanced template as a starting point.

What’s the reasoning behind using tbl_ as a prefix to the generated migration and user tables? Is there a benefit to using a prefix or is it purely a stylistic decision? The only reason I can think of is to avoid conflicts with database key words.

Stylistic decision.

Fair enough. Is there a recommended way to remove these prefixes in our own projects?

Specifically, should I install the advanced application as is, then use additional migrations to alter the database, or should I alter the migration code before creating the initial tables. I’m mostly looking for an opinion based on experience.

Doesn’t matter. Once you’ve installed template it is no longer part of Yii but your own application.

I realise that either option is technically acceptable, I was just interested in how someone with experience would handle it. I’m covering a lot of new ground with Yii 2, so I don’t want to get off on the wrong foot.

I’d modify migrations.

Thanks samdark.

Where specifically do you override the properties for tbl_migration and tbl_user? I searched through the class comments for all applicable files in Yii and the Advanced Template but found no properties for overriding these two tables in a config file. Specifically, what are the parameter names used in config. The parameter for tbl_user probably needs to be included under the user component, but where in config would you override the tbl_migration name.

No offense, but table naming conventions are either a developer personal preference or set in stone by corporate programming conventions. The 1.x convention of adding tbl_ as a prefix using by overriding $tablePrefix (and it looks like it is still available) worked fine.