Reorder pipeline stages-related migrations

This commit is contained in:
Grzegorz Bizon 2017-05-26 22:33:50 +02:00
parent 23c9349082
commit ff61e2b776
5 changed files with 10 additions and 8 deletions

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170526190708) do
ActiveRecord::Schema.define(version: 20170526190948) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"

View file

@ -1,7 +1,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20170526101042_migrate_pipeline_stages.rb')
require Rails.root.join('db', 'post_migrate', '20170526185842_migrate_pipeline_stages.rb')
describe MigratePipelineStages, :migration, schema: 20170525132202 do
describe MigratePipelineStages, :migration, schema: 20170526185602 do
##
# Create test data - pipeline and CI/CD jobs.
#

View file

@ -95,12 +95,14 @@ RSpec.configure do |config|
end
config.around(:example, migration: true) do |example|
schema_version = example.metadata.fetch(:schema)
ActiveRecord::Migrator.migrate(migrations_paths, schema_version)
begin
schema_version = example.metadata.fetch(:schema)
ActiveRecord::Migrator.migrate(migrations_paths, schema_version)
example.run
ActiveRecord::Migrator.migrate(migrations_paths)
example.run
ensure
ActiveRecord::Migrator.migrate(migrations_paths)
end
end
end