function upgrade_5_step1() { $table = table_by_key('configdetails'); $error1 = _upgrade_db_query("CREATE TABLE IF NOT EXISTS `{$table}` (\n `config_key` char(255) NOT NULL,\n `value` text NOT NULL,\n `description_key` text DEFAULT NULL,\n `mandatory` smallint(1) DEFAULT 1,\n `category` char(255) DEFAULT NULL,\n `base64encoded`smallint(1) DEFAULT 0,\n PRIMARY KEY (`config_key`) ) "); return "Creating lti tables - ok ? " . ($error1 ? 'true' : 'false'); }
function upgrade_4() { $error1 = _db_add_field('templatedetails', 'extra_flags', 'varchar(45)', '', 'access_to_whom'); $table = table_by_key('templatedetails'); $error2 = _upgrade_db_query("UPDATE `{$table}` set `extra_flags`='engine=flash'"); $table = table_by_key('originaltemplatesdetails'); $error3 = _upgrade_db_query("UPDATE `{$table}` set `template_framework`='site' where `template_name`='site'"); $table = table_by_key('sitedetails'); $error4 = _upgrade_db_query("ALTER TABLE `{$table}` CHANGE COLUMN `site_text` `site_text` TEXT NULL DEFAULT NULL"); $error_returned = true; if ($error1 === false || $error2 === false || $error3 === false || $error4 === false) { $error_returned = false; // echo "creating lti tables FAILED"; } return "Creating default engine flag - ok ? " . ($error_returned ? 'true' : 'false'); }