Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility of recent migration with PostgreSQL 10 #25324

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions config/initializers/strong_migrations.rb
@@ -1,3 +1,4 @@
# frozen_string_literal: true

StrongMigrations.start_after = 2017_09_24_022025
StrongMigrations.target_version = 10
14 changes: 12 additions & 2 deletions db/migrate/20230605085710_add_exclusive_to_lists.rb
@@ -1,7 +1,17 @@
# frozen_string_literal: true

require Rails.root.join('lib', 'mastodon', 'migration_helpers')

class AddExclusiveToLists < ActiveRecord::Migration[6.1]
def change
add_column :lists, :exclusive, :boolean, null: false, default: false
include Mastodon::MigrationHelpers

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
2 changes: 1 addition & 1 deletion db/schema.rb
Expand Up @@ -567,7 +567,7 @@
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "replies_policy", default: 0, null: false
t.boolean "exclusive", default: false
t.boolean "exclusive", default: false, null: false
t.index ["account_id"], name: "index_lists_on_account_id"
end

Expand Down