Descriptive Table Prefixing

Hello Everyone,

I’m a bit confused about using the table prefix configuration option’s. I’ve looked around a bit and can’t seem to find the answer that fit’s my need. So here go’s a post.

How could I give extensions that make use of the application database there own unique table prefix. For example. I’m creating a new application and the table’s are built by myself could have and extension of lets say TV_ then I find a cool module/extension that I want to install that uses the database but I want to give it a descriptive table prefix so I know that the tables it installs belong to that module etc…

Sorry in advance if this has been talked about someone else on the forum but I could find anything that helped me understand how to do this correctly. That is if there is a correct way to do it…

Thanks,

Travis

I think that prefixes are just to allow installing same application in one shared database along with other ones. It’s not much use when you can create more than one database and separate your applications.

For separating modules I use different schemas in PostgreSQL which can be prepended to table names in models. I guess you can use prefixes this way, but by specifying your own property that would be used in tableName() methods instead of relying on tablePrefix in CDbConnection.

This will be just a single application that I’ll be using extensions to enhance it. I just kinda wanted to be able to discern what table’s belong to third party extensions that I install. I guess it’s not that big of a deal as I have a Workbench model of the database and I can address it there just thought there might be a easy way to handle this in the framework configuration.

Thanks for your input :)