Commit 361c3629 authored by Robert May's avatar Robert May

Add auto_delete_at to environments

Adds a new column for storing a timestamp after which the environment
is allowed to be auto-deleted.
parent 6100ba7f
# frozen_string_literal: true
class AddAutoDeleteAtToEnvironments < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
with_lock_retries do
add_column :environments, :auto_delete_at, :datetime_with_timezone
end
end
def down
with_lock_retries do
remove_column :environments, :auto_delete_at
end
end
end
ad83205a0203427ccad1c25933e28cf13ebfb0274865ce5f0f2d578e84bb07a3
\ No newline at end of file
......@@ -12105,7 +12105,8 @@ CREATE TABLE environments (
environment_type character varying,
state character varying DEFAULT 'available'::character varying NOT NULL,
slug character varying NOT NULL,
auto_stop_at timestamp with time zone
auto_stop_at timestamp with time zone,
auto_delete_at timestamp with time zone
);
CREATE SEQUENCE environments_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