2018-02-06 15:09:28 -05:00
|
|
|
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
|
|
|
|
# for more information on how to write migrations for GitLab.
|
|
|
|
|
2018-11-13 02:27:31 -05:00
|
|
|
class ResetEventsPrimaryKeySequence < ActiveRecord::Migration[4.2]
|
2018-02-06 15:09:28 -05:00
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
# Set this constant to true if this migration requires downtime.
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
class Event < ActiveRecord::Base
|
|
|
|
self.table_name = 'events'
|
|
|
|
end
|
|
|
|
|
|
|
|
def up
|
2019-06-13 09:12:28 -04:00
|
|
|
reset_pk_sequence!(Event.table_name)
|
2018-02-06 15:09:28 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
# No-op
|
|
|
|
end
|
|
|
|
end
|