Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C chouette-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 36
    • Merge requests 36
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Administrator
  • chouette-core
  • Wiki
  • Rails migrations

Rails migrations · Changes

Page history
Retrieve chouette-core wiki content authored May 06, 2018 by Alban Peignier's avatar Alban Peignier
Hide whitespace changes
Inline Side-by-side
Showing with 15 additions and 0 deletions
+15 -0
  • Rails-migrations.md Rails-migrations.md +15 -0
  • No files found.
Rails-migrations.md 0 → 100644
View page @ f9aa7ef7
## Adding a PostgreSQL extension
When modifying Postgres extensions, these queries must be wrapped in an `EXISTS` condition. We do this because our development, integration, and production servers get their extensions added outside of the Rails migration system. Without checking for `EXISTS`, these migrations would fail.
```ruby
class EnableUnaccentExtension < ActiveRecord::Migration
def up
execute 'CREATE EXTENSION IF NOT EXISTS unaccent SCHEMA shared_extensions;'
end
def down
execute 'DROP EXTENSION IF EXISTS unaccent SCHEMA shared_extensions;'
end
end
```
Clone repository

Coding Conventions