aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/1.155_tic_5170_clean_up.php
blob: 950da2ef0b0ed8939370d89392748b580249dd6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
class Tic5170CleanUp extends Migration
{
    public function description()
    {
        return 'cleans up a bit.';
    }

    public function up()
    {
        $db = DBManager::get();
        $db->exec("ALTER TABLE `message` DROP `chat_id`, DROP `readed`");
        $db->exec("ALTER TABLE `message_user` DROP `confirmed_read`");
        try {
            $db->exec("ALTER TABLE `message_user` DROP COLUMN `dont_delete`");
        } catch (Exception $e) { }
        $db->exec("ALTER TABLE `user_info` DROP `guestbook`");
        $db->exec("DROP TABLE object_rate");
        $db->exec("DROP TABLE object_user");
        $db->exec("DROP TABLE px_topics");
        $db->exec("DROP TABLE rss_feeds");
        $db->exec("DELETE FROM user_visibility_settings WHERE plugin IS NOT NULL");
        $db->exec("DELETE FROM user_visibility_settings WHERE identifier = 'plugins'");
    }
}