/** * Expand session id column to varchar(256) to accommodate expanded size possible in PHP 7.1 * Force ascii character set to prevent key length issues. * * @return bool */ public function apply_sess_id() { $migrate = new Tables(); $migrate->useTable('session'); $migrate->alterColumn('session', 'sess_id', "varchar(256) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT ''"); return $migrate->executeQueue(true); }
/** * Compare target and current schema, building work queue in $this->migrate to synchronized * * @return string[] array of DDL/SQL statements to transform current to target schema */ public function getSynchronizeDDL() { $this->getTargetDefinitions(); $this->preSyncActions(); foreach ($this->moduleTables as $tableName) { if ($this->tableHandler->useTable($tableName)) { $this->synchronizeTable($tableName); } else { $this->addMissingTable($tableName); } } return $this->tableHandler->dumpQueue(); }
/** * @return bool */ public function apply_online_ip() { $migrate = new Tables(); $migrate->useTable('online'); $migrate->alterColumn('online', 'online_ip', "varchar(45) NOT NULL DEFAULT ''"); return $migrate->executeQueue(true); }