Add object storage flag to Geo Node (migration)

This commit is contained in:
Gabriel Mazetto 2019-07-15 19:06:01 +01:00 committed by Michael Kozono
parent df35d772c6
commit 6e93f2c712
No known key found for this signature in database
GPG Key ID: F30CB0E425B3F042
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,21 @@
# frozen_string_literal: true
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class AddObjectStorageFlagToGeoNode < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
disable_ddl_transaction!
def up
add_column_with_default :geo_nodes, :sync_object_storage, :boolean, default: false
end
def down
remove_column :geo_nodes, :sync_object_storage
end
end

View File

@ -1456,6 +1456,7 @@ ActiveRecord::Schema.define(version: 2019_08_06_071559) do
t.integer "container_repositories_max_capacity", default: 10, null: false
t.datetime_with_timezone "created_at"
t.datetime_with_timezone "updated_at"
t.boolean "sync_object_storage", default: false, null: false
t.index ["access_key"], name: "index_geo_nodes_on_access_key"
t.index ["name"], name: "index_geo_nodes_on_name", unique: true
t.index ["primary"], name: "index_geo_nodes_on_primary"