Menu

#3820 moderation upgrades error

Slash 2.5/3.0
open
5
2006-11-14
2006-11-14
shane
No

in sql/mysql/upgrades there is:

# FYI: Since you're upgrading from a previous version of Slash, you
# already have the Moderation plugin's SQL changes applied. This adds
the
# row to your site_info table that offically means Moderation is installed,
# but actually doing the install would be redundant.
#
# So: all sites upgrading should apply these changes. If your site
# won't be using moderation, set the 'm1' var to '0'.
UPDATE vars SET name='m1', description='Allows use of the moderation
system' WHERE name='allow_moderation';
INSERT IGNORE INTO vars (name, value, description) VALUES ('m1', '1',
'Allows use of the moderation system');
INSERT INTO site_info (name, value, description) VALUES ('plugin',
'Moderation', 'Moderation (Classic)');
INSERT INTO vars (name, value, description) VALUES ('m1_pluginname',
'Moderation', 'Which moderation plugin to use');

that first update line needs where criteria.

Discussion

  • shane

    shane - 2006-11-14

    Logged In: YES
    user_id=52587

    sorry, hit return. needs to say 'needs where criteria where the name 'allow moderation' exists. because

    mysql> UPDATE vars SET name='m1', description='Allows use of the moderation system' WHERE name='allow_moderation';
    Query OK, 0 rows affected (0.00 sec)
    Rows matched: 0 Changed: 0 Warnings: 0

    mysql> select * from vars where name='allow_moderation';
    Empty set (0.00 sec)

     
  • shane

    shane - 2006-11-14

    Logged In: YES
    user_id=52587

    i figured out what's up. The upgrades file has two modifcations done to vars for allow_moderation and the m1 in it, in two different tags. The first one trumps the second, so
    that second update fails.

    In tag T_2_5_0_125 it does this

    UPDATE vars SET name='m1' WHERE name='allow_moderation';

    then in

    T_2_5_0_131 it does this

    UPDATE vars SET name='m1', description='Allows use of the moderation system' WHERE name='allow_moderation';

    obviously, by _131 'allow_moderation' doesn't exist.

     

Log in to post a comment.