Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
3a29646d
Commit
3a29646d
authored
Aug 17, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable migrations output in migrations helpers
parent
56d24bcf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
spec/support/migrations_helpers.rb
spec/support/migrations_helpers.rb
+17
-3
No files found.
spec/support/migrations_helpers.rb
View file @
3a29646d
...
@@ -36,16 +36,30 @@ module MigrationsHelpers
...
@@ -36,16 +36,30 @@ module MigrationsHelpers
end
end
def
schema_migrate_down!
def
schema_migrate_down!
ActiveRecord
::
Migrator
disable_migrations_output
do
.
migrate
(
migrations_paths
,
migration_schema_version
)
ActiveRecord
::
Migrator
.
migrate
(
migrations_paths
,
migration_schema_version
)
end
reset_column_in_migration_models
reset_column_in_migration_models
end
end
def
schema_migrate_up!
def
schema_migrate_up!
ActiveRecord
::
Migrator
.
migrate
(
migrations_paths
)
disable_migrations_output
do
ActiveRecord
::
Migrator
.
migrate
(
migrations_paths
)
end
reset_column_in_migration_models
reset_column_in_migration_models
end
end
def
disable_migrations_output
ActiveRecord
::
Migration
.
verbose
=
false
yield
ensure
ActiveRecord
::
Migration
.
verbose
=
true
end
def
migrate!
def
migrate!
ActiveRecord
::
Migrator
.
up
(
migrations_paths
)
do
|
migration
|
ActiveRecord
::
Migrator
.
up
(
migrations_paths
)
do
|
migration
|
migration
.
name
==
described_class
.
name
migration
.
name
==
described_class
.
name
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment