Commit be15d17a authored by Andreas Brandl's avatar Andreas Brandl

Track finished_at timestamp for schema migrations

Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/323343

Changelog: other
parent 6fb4fb2e
# frozen_string_literal: true
class AddTimestampToSchemaMigration < ActiveRecord::Migration[6.1]
def up
# Add a nullable column with default null first
add_column :schema_migrations, :finished_at, :timestamptz
# Change default to NOW() for new records
change_column :schema_migrations, :finished_at, :timestamptz, default: -> { 'NOW()' }
end
def down
remove_column :schema_migrations, :finished_at
end
end
52843d12ab18b92c71a334cf877682d9fae57632cf0ba14213dfc0543e39cf1b
\ No newline at end of file
......@@ -17715,7 +17715,8 @@ CREATE SEQUENCE saml_providers_id_seq
ALTER SEQUENCE saml_providers_id_seq OWNED BY saml_providers.id;
CREATE TABLE schema_migrations (
version character varying NOT NULL
version character varying NOT NULL,
finished_at timestamp with time zone DEFAULT now()
);
CREATE TABLE scim_identities (
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