Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F461101
migrations.rake
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, May 17, 11:05 PM
Size
1002 B
Mime Type
text/plain
Expires
Mon, May 19, 11:05 PM (10 h, 20 m)
Engine
blob
Format
Raw Data
Handle
220124
Attached To
rARCHIVING archiving
migrations.rake
View Options
load
File
.
expand_path
(
"../set_rails_env.rake"
,
__FILE__
)
namespace
:deploy
do
desc
'Runs rake db:migrate if migrations are set'
task
:migrate
=>
[
:set_rails_env
]
do
on
primary
fetch
(
:migration_role
)
do
conditionally_migrate
=
fetch
(
:conditionally_migrate
)
info
'[deploy:migrate] Checking changes in /db/migrate'
if
conditionally_migrate
if
conditionally_migrate
&&
test
(
"diff -q
#{
release_path
}
/db/migrate
#{
current_path
}
/db/migrate"
)
info
'[deploy:migrate] Skip `deploy:migrate` (nothing changed in db/migrate)'
else
info
'[deploy:migrate] Run `rake db:migrate`'
within
release_path
do
with
rails_env
:
fetch
(
:rails_env
)
do
execute
:rake
,
"db:migrate"
end
end
end
end
end
after
'deploy:updated'
,
'deploy:migrate'
end
namespace
:load
do
task
:defaults
do
set
:conditionally_migrate
,
fetch
(
:conditionally_migrate
,
false
)
set
:migration_role
,
fetch
(
:migration_role
,
:db
)
end
end
Event Timeline
Log In to Comment