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

**URL:** <https://forum.shopware.com/t/what-is-the-table-name-for-new-tables-in-custom-plugins/60490>\
**Category:** Plugins\
**Created:** [18. Juli 2019 um 06:14 UTC](https://forum.shopware.com/t/what-is-the-table-name-for-new-tables-in-custom-plugins/60490 "2019-07-18T06:14:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![abinjohnedamana](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/abinjohnedamana/32/17378_2.png) [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)\
**Post date:** [18. Juli 2019 um 06:14 UTC](https://forum.shopware.com/t/what-is-the-table-name-for-new-tables-in-custom-plugins/60490/1 "2019-07-18T06:14:28Z")

</div>

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&nbsp;[https://docs.shopware.com/en/plugin-standard-for-community-store](https://docs.shopware.com/en/plugin-standard-for-community-store). I am a little bit confused.&nbsp;

What should be my table name

1. s\_plugin\_AbandonedCartNotification\_CartItems

2. s\_plugin\_abandonedcartnotification\_cartitems

3)&nbsp;CartItems\_s\_plugin\_AbandonedCartNotification

4)&nbsp;cartitems\_s\_plugin\_abandonedcartnotification

Which one is correct?

&nbsp;

---

<div class="post-metadata">

**Author:** ![DenKon26](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@DenKon26](https://forum.shopware.com/u/DenKon26)\
**Post date:** [18. Juli 2019 um 06:29 UTC](https://forum.shopware.com/t/what-is-the-table-name-for-new-tables-in-custom-plugins/60490/2 "2019-07-18T06:29:55Z")

</div>

Hi,

&nbsp;

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

I would name the table “s\_plugin\_abandoned\_cart\_notification\_cart\_items”

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [18. Juli 2019 um 07:16 UTC](https://forum.shopware.com/t/what-is-the-table-name-for-new-tables-in-custom-plugins/60490/3 "2019-07-18T07:16:59Z")

</div>

Hello,

what @DenKon26‍ said is correct. I will fix the documentation. It is indeed wrong&nbsp; ![Smile](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/bac5f5766b6a20565a8fb995345b4e41d24daac0.png "Smile")  
As&nbsp;addition:&nbsp;this is not mandatory to get your plugin work, you could name the tables like you want.

Best regards from Schöppingen

![cool](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "cool")&nbsp;Michael Telgmann

---

<div class="post-metadata">

**Author:** ![abinjohnedamana](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/abinjohnedamana/32/17378_2.png) [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)\
**Post date:** [18. Juli 2019 um 07:30 UTC](https://forum.shopware.com/t/what-is-the-table-name-for-new-tables-in-custom-plugins/60490/4 "2019-07-18T07:30:32Z")

</div>

@[Michael Telgmann](https://forum.shopware.com/profile/17553/Michael%20Telgmann)&nbsp;&nbsp;If you add some examples or links to the developer guides in the documentation it will be really helpful for developers.

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [18. Juli 2019 um 09:22 UTC](https://forum.shopware.com/t/what-is-the-table-name-for-new-tables-in-custom-plugins/60490/5 "2019-07-18T09:22:13Z")

</div>

Hey @abinjohnedamana‍

a colleague of mine has this tasks already on his Todo list&nbsp; ![Wink](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/b3785da0cbf2c8566cb535dcf55b2730b5224899.png "Wink")&nbsp;So soon there will be improvements

Best regards from Schöppingen

&nbsp;Michael Telgmann

---

<div class="post-metadata">

**Author:** ![abinjohnedamana](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/abinjohnedamana/32/17378_2.png) [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)\
**Post date:** [18. Juli 2019 um 09:51 UTC](https://forum.shopware.com/t/what-is-the-table-name-for-new-tables-in-custom-plugins/60490/6 "2019-07-18T09:51:25Z")

</div>

Awesome&nbsp; ![Thumb-Up](https://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/thumb-up.png "Thumb-Up")
