Drop column repository_read_only column in namespaces tables

parent 994c02bf
---
title: Add repository_read_only column to the Namespace table
merge_request: 51800
author:
type: added
---
title: Drop repository_read_only column from namespaces table
merge_request: 52181
author:
type: changed
# frozen_string_literal: true
class AddRepositoryReadOnlyToGroups < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
with_lock_retries do
add_column :namespaces, :repository_read_only, :boolean, default: false, null: false
end
end
def down
with_lock_retries do
remove_column :namespaces, :repository_read_only
end
end
end
# frozen_string_literal: true
class RemoveRepositoryReadOnlyToGroups < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
if column_exists?(:namespaces, :repository_read_only)
with_lock_retries do
remove_column :namespaces, :repository_read_only # rubocop:disable Migration/RemoveColumn
end
end
end
def down
unless column_exists?(:namespaces, :repository_read_only)
with_lock_retries do
add_column :namespaces, :repository_read_only, :boolean, default: false, null: false
end
end
end
end
09766a70e36d4bbd8ecf7f5bba36c865873c1ac71f7eb8de04f70fd2c4da242e
\ No newline at end of file
e2be30f71b2a4a410b21e57ee53c3b54cf0214a08bc65cd92b2cb4b93bde9451
\ No newline at end of file
......@@ -14355,8 +14355,7 @@ CREATE TABLE namespaces (
shared_runners_enabled boolean DEFAULT true NOT NULL,
allow_descendants_override_disabled_shared_runners boolean DEFAULT false NOT NULL,
traversal_ids integer[] DEFAULT '{}'::integer[] NOT NULL,
delayed_project_removal boolean DEFAULT false NOT NULL,
repository_read_only boolean DEFAULT false NOT NULL
delayed_project_removal boolean DEFAULT false NOT NULL
);
CREATE SEQUENCE namespaces_id_seq
......
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