#363644 by chx: Remove annoying whitespace.
parent
250e486bb0
commit
4bf29632d4
|
@ -293,7 +293,7 @@ function system_install() {
|
||||||
if (db_driver() == 'pgsql') {
|
if (db_driver() == 'pgsql') {
|
||||||
// We create some functions using global names instead of prefixing them
|
// We create some functions using global names instead of prefixing them
|
||||||
// like we do with table names. If this function is ever called again (for
|
// like we do with table names. If this function is ever called again (for
|
||||||
// example, by the test framework when creating prefixed test databases),
|
// example, by the test framework when creating prefixed test databases),
|
||||||
// the global names will already exist. We therefore avoid trying to create
|
// the global names will already exist. We therefore avoid trying to create
|
||||||
// them again in that case.
|
// them again in that case.
|
||||||
|
|
||||||
|
@ -3140,11 +3140,11 @@ function system_update_7016() {
|
||||||
$ret = array();
|
$ret = array();
|
||||||
// Only run these queries if the driver used is pgsql.
|
// Only run these queries if the driver used is pgsql.
|
||||||
if (db_driver() == 'pgsql') {
|
if (db_driver() == 'pgsql') {
|
||||||
$result = db_query("SELECT c.relname AS table, a.attname AS field,
|
$result = db_query("SELECT c.relname AS table, a.attname AS field,
|
||||||
pg_catalog.format_type(a.atttypid, a.atttypmod) AS type
|
pg_catalog.format_type(a.atttypid, a.atttypmod) AS type
|
||||||
FROM pg_catalog.pg_attribute a
|
FROM pg_catalog.pg_attribute a
|
||||||
LEFT JOIN pg_class c ON (c.oid = a.attrelid)
|
LEFT JOIN pg_class c ON (c.oid = a.attrelid)
|
||||||
WHERE pg_catalog.pg_table_is_visible(c.oid) AND c.relkind = 'r'
|
WHERE pg_catalog.pg_table_is_visible(c.oid) AND c.relkind = 'r'
|
||||||
AND pg_catalog.format_type(a.atttypid, a.atttypmod) LIKE '%unsigned%'");
|
AND pg_catalog.format_type(a.atttypid, a.atttypmod) LIKE '%unsigned%'");
|
||||||
while ($row = db_fetch_object($result)) {
|
while ($row = db_fetch_object($result)) {
|
||||||
switch ($row->type) {
|
switch ($row->type) {
|
||||||
|
@ -3157,7 +3157,7 @@ function system_update_7016() {
|
||||||
$datatype = 'bigint';
|
$datatype = 'bigint';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$ret[] = update_sql('ALTER TABLE ' . $row->table . ' ALTER COLUMN ' . $row->field . ' TYPE ' . $datatype);
|
$ret[] = update_sql('ALTER TABLE ' . $row->table . ' ALTER COLUMN ' . $row->field . ' TYPE ' . $datatype);
|
||||||
$ret[] = update_sql('ALTER TABLE ' . $row->table . ' ADD CHECK (' . $row->field . ' >= 0)');
|
$ret[] = update_sql('ALTER TABLE ' . $row->table . ' ADD CHECK (' . $row->field . ' >= 0)');
|
||||||
}
|
}
|
||||||
$ret[] = update_sql('DROP DOMAIN smallint_unsigned');
|
$ret[] = update_sql('DROP DOMAIN smallint_unsigned');
|
||||||
|
|
Loading…
Reference in New Issue