20191212003415_increase_backup_size.rb 602 B

1234567891011121314151617181920212223
  1. # frozen_string_literal: true
  2. require Rails.root.join('lib', 'mastodon', 'migration_helpers')
  3. class IncreaseBackupSize < ActiveRecord::Migration[5.2]
  4. include Mastodon::MigrationHelpers
  5. disable_ddl_transaction!
  6. def up
  7. safety_assured do
  8. change_column_type_concurrently :backups, :dump_file_size, :bigint
  9. cleanup_concurrent_column_type_change :backups, :dump_file_size
  10. end
  11. end
  12. def down
  13. safety_assured do
  14. change_column_type_concurrently :backups, :dump_file_size, :integer
  15. cleanup_concurrent_column_type_change :backups, :dump_file_size
  16. end
  17. end
  18. end