Commit 82652580 authored by Toon Claes's avatar Toon Claes

Remove system_hook_id from geo_nodes as per development guidelines

Instead of dropping the column in a migration, ignore the column and
drop it in a post-deploy migration.

A follow-up MR for 10.1 will be made to remove the `ignore_column`
from GeoNode.

See:
https://docs.gitlab.com/ee/development/what_requires_downtime.html#dropping-columns
parent 8103470d
class GeoNode < ActiveRecord::Base
include Presentable
include IgnorableColumn
ignore_column :system_hook_id
belongs_to :geo_node_key, dependent: :destroy # rubocop: disable Cop/ActiveRecordDependent
belongs_to :oauth_application, class_name: 'Doorkeeper::Application', dependent: :destroy # rubocop: disable Cop/ActiveRecordDependent
......
require "spec_helper"
require Rails.root.join("db", "migrate", "20170811082658_remove_system_hook_from_geo_nodes.rb")
require Rails.root.join("db", "post_migrate", "20170811082658_remove_system_hook_from_geo_nodes.rb")
describe RemoveSystemHookFromGeoNodes, :migration do
let(:geo_nodes) { table(:geo_nodes) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment