# 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:** [30 Novembre 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:** 8

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [16 Ottobre 2019, 9:48am UTC](https://meta.discourse.org/t/create-custom-db-table-and-fields-from-plugin/36164/8 "2019-10-16T09:48:54Z")

</div>

Questo dovrebbe rispondere alle domande per le persone qui

> [@New columns in directory (/users)](https://meta.discourse.org/t/new-columns-in-directory-users/77814/5):
>
> FWIW I’ve decided to go this route with a plugin of mine, where PluginStoreRow and CustomFields didn’t qqquite cut it on their own. warning Caveat emptor warning You should be trying really hard not to do this - It’s not recommended behaviour to modify the database from within a plugin, but it can be done unobtrusively in small, additive doses (I’d say you never for any reason want to remove or change existing columns) Here’s how I did it: Write a migration in the plugin which modifies th…

---

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