debian-mirror-gitlab/lib/gitlab/database/migrations/observers/migration_observer.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
673 B
Ruby
Raw Normal View History

2021-03-11 19:13:27 +05:30
# frozen_string_literal: true
module Gitlab
module Database
module Migrations
module Observers
class MigrationObserver
2021-11-18 22:05:49 +05:30
attr_reader :connection, :observation, :output_dir
2021-03-11 19:13:27 +05:30
2022-01-26 12:08:38 +05:30
def initialize(observation, output_dir, connection)
@connection = connection
2021-10-27 15:23:28 +05:30
@observation = observation
2021-11-18 22:05:49 +05:30
@output_dir = output_dir
2021-03-11 19:13:27 +05:30
end
def before
# implement in subclass
end
def after
# implement in subclass
end
2021-10-27 15:23:28 +05:30
def record
2021-03-11 19:13:27 +05:30
raise NotImplementedError, 'implement in subclass'
end
end
end
end
end
end