diff --git a/src/includes/class.db.postgres.php b/src/includes/class.db.postgres.php index 3a8e57e..dfc22ae 100644 --- a/src/includes/class.db.postgres.php +++ b/src/includes/class.db.postgres.php @@ -15,9 +15,6 @@ class DatabaseResult_Postgres extends DatabaseResult_Abstract /** @var int */ protected $affected; - /** @var string const */ - protected $schema = 'public'; - function __construct(PDO $dbh, string $query, bool $resultless = false) { // use with DELETE, INSERT, UPDATE @@ -70,6 +67,9 @@ class Database_Postgres extends Database_Abstract protected $dbname; + /** @var string const */ + protected $schema = 'public'; + function __construct() { } diff --git a/src/setup.php b/src/setup.php index 560e0f4..93e0d6c 100644 --- a/src/setup.php +++ b/src/setup.php @@ -378,7 +378,7 @@ function createPostgresTables(Database_Abstract $db) id INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name VARCHAR(250) NOT NULL DEFAULT '' ) "); - $db->ex("CREATE UNIQUE INDEX {$db->prefix}tags_name ON {$db->prefix}tags (name)"); + $db->ex("CREATE UNIQUE INDEX {$db->prefix}tags_lower_name ON {$db->prefix}tags ((LOWER(name)))"); $db->ex( "CREATE TABLE {$db->prefix}tag2task (