'name' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'name of the source'),
'url' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'url to link to'),
'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'date this record was created'),
+ 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
),
'primary key' => array('code'),
}
$schema->ensureTable($name, $def);
}
+ return true;
}
/**
if (!mb_strlen($stmt)) {
continue;
}
- $res = $conn->execute($stmt);
- if (DB::isError($res)) {
- $error = $result->getMessage();
+ try {
+ $res = $conn->simpleQuery($stmt);
+ } catch (Exception $e) {
+ $error = $e->getMessage();
$this->updateStatus("ERROR ($error) for SQL '$stmt'");
- return $res;
+ return false;
}
}
return true;
*/
function registerInitialUser()
{
- define('STATUSNET', true);
- define('LACONICA', true); // compatibility
-
require_once INSTALLDIR . '/lib/common.php';
$data = array('nickname' => $this->adminNick,
$vals = array_map(array($this, 'quote'), $column['enum']);
return 'enum(' . implode(',', $vals) . ')';
} else if ($this->_isString($column)) {
- return parent::typeAndSize($column) . ' CHARSET utf8';
+ $col = parent::typeAndSize($column);
+ if (!empty($column['charset'])) {
+ $col .= ' CHARSET ' . $column['charset'];
+ }
+ if (!empty($column['collate'])) {
+ $col .= ' COLLATE ' . $column['collate'];
+ }
+ return $col;
} else {
return parent::typeAndSize($column);
}