Fix compatibility of recent migration with PostgreSQL 10 (#25324)
parent
67d17ce194
commit
f378f10404
@ -1,3 +1,4 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
StrongMigrations.start_after = 2017_09_24_022025
|
StrongMigrations.start_after = 2017_09_24_022025
|
||||||
|
StrongMigrations.target_version = 10
|
||||||
|
@ -1,7 +1,17 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require Rails.root.join('lib', 'mastodon', 'migration_helpers')
|
||||||
|
|
||||||
class AddExclusiveToLists < ActiveRecord::Migration[6.1]
|
class AddExclusiveToLists < ActiveRecord::Migration[6.1]
|
||||||
def change
|
include Mastodon::MigrationHelpers
|
||||||
add_column :lists, :exclusive, :boolean, null: false, default: false
|
|
||||||
|
disable_ddl_transaction!
|
||||||
|
|
||||||
|
def up
|
||||||
|
safety_assured { add_column_with_default :lists, :exclusive, :boolean, default: false, allow_null: false }
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
remove_column :lists, :exclusive
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in new issue