# Create custom db table and fields from plugin

**URL:** <https://meta.discourse.org/t/create-custom-db-table-and-fields-from-plugin/36164>\
**Category:** Development\
**Created:** [November 30, 2015, 6:09pm UTC](https://meta.discourse.org/t/create-custom-db-table-and-fields-from-plugin/36164 "2015-11-30T18:09:49Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![spirobel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/spirobel/32/170908_2.png) [@spirobel](https://meta.discourse.org/u/spirobel)\
**Post date:** [October 16, 2019, 8:37pm UTC](https://meta.discourse.org/t/create-custom-db-table-and-fields-from-plugin/36164/9 "2019-10-16T20:37:41Z")

</div>

I think its better to do migrations like the polls plugin. I created a migration and model generator for plugins: [GitHub - spirobel/discourse at plugin\_model\_and\_migrations](https://github.com/spirobel/discourse/tree/plugin_model_and_migrations) It puts the migration files at the same spot like in the polls plugin.

---

_[View the full topic](https://meta.discourse.org/t/create-custom-db-table-and-fields-from-plugin/36164)._
