mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 09:27:19 +02:00
rake db:rollback updates schema file as well #2751
This commit is contained in:
parent
2eece9301a
commit
9f9a330950
1 changed files with 6 additions and 0 deletions
|
@ -6,6 +6,12 @@ Rake::Task["db:migrate"].enhance do
|
|||
end
|
||||
end
|
||||
|
||||
Rake::Task["db:rollback"].enhance do
|
||||
if ActiveRecord::Base.schema_format == :sql
|
||||
Rake::Task["db:schema:dump"].invoke
|
||||
end
|
||||
end
|
||||
|
||||
Rake::Task["db:schema:dump"].enhance do
|
||||
if ActiveRecord::Base.schema_format == :sql
|
||||
File.rename('db/schema.rb', 'db/schema-read-only.rb')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue