SnefIT Posted November 12, 2019 Share Posted November 12, 2019 Hi, I've used doctrine in other projects but having problems in PrestaShop. I see the PS creates the tablenames, but is it possible to set the table name? I think the tablenames are not prefixed like the bestpractises advices. When I have an entity called "BlaFoo", it will create a table like ps_bla_foo. It would be nice when the table name can be prefixed with a company name or namespace the entity is in. Or is it just using (ugly) class names? Link to comment Share on other sites More sharing options...
_tech Posted November 12, 2019 Share Posted November 12, 2019 Hi, did you read https://devdocs.prestashop.com/1.7/modules/concepts/doctrine/#creating-the-database ? Link to comment Share on other sites More sharing options...
SnefIT Posted November 12, 2019 Author Share Posted November 12, 2019 Yes I did. Lets say I have a namespace of "SnefIT" and an entity classname of "GoogleMaps". The tablename will be "ps_google_maps" Looks fine, but I think the tablename should be something like "ps_snefit_google_maps" so that it it better prefixed. Workaround is naming the class SnefitGoogleMaps. Is usable i think. Normally you could give a schema name in the @Table annotation. But not within PrestaShop. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now