Commit e55abb13 authored by Sean McGivern's avatar Sean McGivern Committed by Adam Hegyi

Remove trial_ends_on from namespaces

parent 0a98de1f
# frozen_string_literal: true
class RemoveNamespacesTrialEndsOn < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
remove_concurrent_index_by_name :namespaces, 'index_namespaces_on_trial_ends_on'
with_lock_retries do
remove_column :namespaces, :trial_ends_on
end
end
def down
unless column_exists?(:namespaces, :trial_ends_on)
with_lock_retries do
add_column :namespaces, :trial_ends_on, :datetime_with_timezone
end
end
add_concurrent_index :namespaces, :trial_ends_on, using: 'btree', where: 'trial_ends_on IS NOT NULL'
end
end
......@@ -4201,7 +4201,6 @@ CREATE TABLE public.namespaces (
cached_markdown_version integer,
project_creation_level integer,
runners_token character varying,
trial_ends_on timestamp with time zone,
file_template_project_id integer,
saml_discovery_token character varying,
runners_token_encrypted character varying,
......@@ -10153,8 +10152,6 @@ CREATE UNIQUE INDEX index_namespaces_on_runners_token_encrypted ON public.namesp
CREATE INDEX index_namespaces_on_shared_and_extra_runners_minutes_limit ON public.namespaces USING btree (shared_runners_minutes_limit, extra_shared_runners_minutes_limit);
CREATE INDEX index_namespaces_on_trial_ends_on ON public.namespaces USING btree (trial_ends_on) WHERE (trial_ends_on IS NOT NULL);
CREATE INDEX index_namespaces_on_type_partial ON public.namespaces USING btree (type) WHERE (type IS NOT NULL);
CREATE INDEX index_non_requested_project_members_on_source_id_and_type ON public.members USING btree (source_id, source_type) WHERE ((requested_at IS NULL) AND ((type)::text = 'ProjectMember'::text));
......@@ -13838,6 +13835,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200407222647
20200408110856
20200408125046
20200408132152
20200408133211
20200408153842
20200408154331
......
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