What is the table name for new tables in custom plugins?

I am developing a plugin named “Abandoned Cart Notification”. I am going to create a new table “cart_items”.

I read this “The suffix for your own database tables is s_plugin. If you use your own tables, the structure must be as follows: s_plugin_MyPluginName”

from https://docs.shopware.com/en/plugin-standard-for-community-store. I am a little bit confused. 

What should be my table name

  1. s_plugin_AbandonedCartNotification_CartItems

  2. s_plugin_abandonedcartnotification_cartitems

3) CartItems_s_plugin_AbandonedCartNotification

4) cartitems_s_plugin_abandonedcartnotification

Which one is correct?

 

Hi,

 

I think “suffix” should be “prefix” in this context. Its simply a wrong word in the documentation :slight_smile:

I would name the table “s_plugin_abandoned_cart_notification_cart_items”

1 „Gefällt mir“

Hello,

what @DenKon26‍ said is correct. I will fix the documentation. It is indeed wrong  Smile
As addition: this is not mandatory to get your plugin work, you could name the tables like you want.

Best regards from Schöppingen

cool Michael Telgmann

1 „Gefällt mir“

@Michael Telgmann  If you add some examples or links to the developer guides in the documentation it will be really helpful for developers.

Hey @abinjohnedamana‍

a colleague of mine has this tasks already on his Todo list  Wink So soon there will be improvements

Best regards from Schöppingen

 Michael Telgmann

1 „Gefällt mir“

Awesome  Thumb-Up