mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
fix index in postgres
This commit is contained in:
parent
476ccc99ff
commit
f870bc3cf0
2 changed files with 4 additions and 4 deletions
|
|
@ -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()
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
|
|
|
|||
Loading…
Reference in a new issue