diff options
author | Gabriel Mazetto <brodock@gmail.com> | 2019-07-15 19:06:01 +0100 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2019-08-13 11:51:45 -0700 |
commit | 6e93f2c7122d9b8cfa932342d22628e1f1e10189 (patch) | |
tree | 99842f670f2a68994556902190dcc632fbea5481 | |
parent | df35d772c655587eecbe7b3e387c8b8bc287b23c (diff) | |
download | gitlab-ce-6e93f2c7122d9b8cfa932342d22628e1f1e10189.tar.gz |
Add object storage flag to Geo Node (migration)
-rw-r--r-- | db/migrate/20190715173819_add_object_storage_flag_to_geo_node.rb | 21 | ||||
-rw-r--r-- | db/schema.rb | 1 |
2 files changed, 22 insertions, 0 deletions
diff --git a/db/migrate/20190715173819_add_object_storage_flag_to_geo_node.rb b/db/migrate/20190715173819_add_object_storage_flag_to_geo_node.rb new file mode 100644 index 00000000000..2d3243f3357 --- /dev/null +++ b/db/migrate/20190715173819_add_object_storage_flag_to_geo_node.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index 591758af0e4..003f12b5171 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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" |