mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 03:09:43 +00:00
FIX: migration name
Was generating: `NameError: uninitialized constant PrivateMessagesHaveNoCategoryId`
This commit is contained in:
parent
e2b4aa0fbd
commit
6ca5a9b82c
@ -1,4 +1,4 @@
|
|||||||
class PrivateMessageShaveNoCategoryId < ActiveRecord::Migration
|
class PrivateMessagesHaveNoCategoryId < ActiveRecord::Migration
|
||||||
def up
|
def up
|
||||||
execute "UPDATE topics SET category_id = NULL WHERE category_id IS NOT NULL AND archetype = \'private_message\'"
|
execute "UPDATE topics SET category_id = NULL WHERE category_id IS NOT NULL AND archetype = \'private_message\'"
|
||||||
execute "ALTER TABLE topics ADD CONSTRAINT pm_has_no_category CHECK (category_id IS NULL OR archetype <> 'private_message')"
|
execute "ALTER TABLE topics ADD CONSTRAINT pm_has_no_category CHECK (category_id IS NULL OR archetype <> 'private_message')"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user