# Plugin Database Migrations

**URL:** <https://meta.discourse.org/t/plugin-database-migrations/259521>\
**Category:** Development\
**Created:** [March 27, 2023, 8:50am UTC](https://meta.discourse.org/t/plugin-database-migrations/259521 "2023-03-27T08:50:37Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [March 27, 2023, 9:30am UTC](https://meta.discourse.org/t/plugin-database-migrations/259521/4 "2023-03-27T09:30:35Z")

</div>

You don’t run migrations from within a plugin.

In a Dev environment you perform them from the console.

Why? Because when you deploy a plugin the migrations are taken care of by the host app.

It’s out of scope of what a plugin should do.

(FYI that’s not to say you don’t include migrations within the plugin if you are e.g. modifying the database but the plugin is not going to _perform_ the migrations)

---

_[View the full topic](https://meta.discourse.org/t/plugin-database-migrations/259521)._
