debian-mirror-gitlab/db/migrate/20220105121325_add_route_namespace_reference.rb
2022-03-02 08:16:31 +05:30

13 lines
336 B
Ruby

# frozen_string_literal: true
class AddRouteNamespaceReference < Gitlab::Database::Migration[1.0]
enable_lock_retries!
def up
add_column :routes, :namespace_id, :bigint unless column_exists?(:routes, :namespace_id)
end
def down
remove_column :routes, :namespace_id if column_exists?(:routes, :namespace_id)
end
end