# Presentazione della migrazione post-distribuzione

**URL:** https://meta.discourse.org/t/introducing-post-deployment-migration/98974
**Category:** Development
**Created:** [8 Ottobre 2018, 8:28am UTC](https://meta.discourse.org/t/introducing-post-deployment-migration/98974 "2018-10-08T08:28:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [8 Ottobre 2018, 8:28am UTC](https://meta.discourse.org/t/introducing-post-deployment-migration/98974/1 "2018-10-08T08:28:42Z")

</div>

As of [FEATURE: Post deployment migrations. (#6406) · discourse/discourse@40fa967 · GitHub](https://github.com/discourse/discourse/commit/40fa96777ddad4698df20d6b8a61afcf87743ed7), we’re moving away from [our delayed drop pattern](https://github.com/discourse/discourse/blob/9bbc1ae7b2ed9bd7e73f3ec9de6cf12e09178612/db/fixtures/000_delayed_drops.rb) to remove a column from a table in the database. Inspired by [Gitlab’s pattern of post deployment migration](https://docs.gitlab.com/ee/development/post_deployment_migrations.html), we’ve added the ability to generate and run migrations that can be run after a deployment.

```plaintext
SKIP_POST_DEPLOYMENT_MIGRATIONS=1 rake db:migrate
-> deploy app servers
SKIP_POST_DEPLOYMENT_MIGRATIONS=0 rake db:migrate

```

To generate a post deployment migration, simply run `rails generate post_migration` followed by the same arguments as you would for the default rails migration generator.
