aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/1.23_enlarge_object_contentmodules_module_id.php
blob: 5a44db134e8523c818206617bbc3f9c323537217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

class EnlargeObjectContentmodulesModuleId extends Migration {

  function description() {
    return 'enlarge object_contentmodules::module_id from VARCHAR32 to VARCHAR255';
  }

  function up() {
    $db = DBManager::get();
    $db->exec("ALTER TABLE `object_contentmodules` CHANGE `module_id` `module_id` VARCHAR( 255 ) NOT NULL DEFAULT ''");
  }

  function down() {
    $db = DBManager::get();
    $db->exec("ALTER TABLE `object_contentmodules` CHANGE `module_id` `module_id` VARCHAR( 255 ) NULL DEFAULT NULL");
  }
}