FIX: migration name

Was generating: `NameError: uninitialized constant PrivateMessagesHaveNoCategoryId`
This commit is contained in:
Régis Hanol 2014-09-11 10:11:12 +02:00
parent e2b4aa0fbd
commit 6ca5a9b82c

View File

@ -1,4 +1,4 @@
class PrivateMessageShaveNoCategoryId < ActiveRecord::Migration
class PrivateMessagesHaveNoCategoryId < ActiveRecord::Migration
def up
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')"