mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-02 17:32:56 +08:00
This promotes all post-migrations which existed in `v2026.1` to regular pre-deploy migrations. We do this after each stable/esr release to reduce the probability of pre/post deploy timing issues.
13 lines
295 B
Ruby
13 lines
295 B
Ruby
# frozen_string_literal: true
|
|
class RenameByIdGroup < ActiveRecord::Migration[7.2]
|
|
def change
|
|
execute <<~SQL
|
|
UPDATE groups
|
|
SET name = 'by-id1'
|
|
WHERE name = 'by-id'
|
|
AND NOT EXISTS (
|
|
SELECT 1 FROM groups WHERE name = 'by-id1'
|
|
);
|
|
SQL
|
|
end
|
|
end
|