diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-09-16 19:30:18 +0200 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-09-16 19:30:18 +0200 |
commit | e7a20b9d8f8d7c47173c59782c5bd24a0ba6cac9 (patch) | |
tree | 8d8a65e19cd11e3fa8f6b4cdf5efa81c9ab1a708 /app/Schema | |
parent | eb6dfdca533bc18d8e1b1bdf4d4505c41d9b9c13 (diff) |
Improve API calls for users
Diffstat (limited to 'app/Schema')
-rw-r--r-- | app/Schema/Mysql.php | 7 | ||||
-rw-r--r-- | app/Schema/Postgres.php | 7 | ||||
-rw-r--r-- | app/Schema/Sqlite.php | 7 |
3 files changed, 18 insertions, 3 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index 86685067..196fb856 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -4,7 +4,12 @@ namespace Schema; use Core\Security; -const VERSION = 26; +const VERSION = 27; + +function version_27($pdo) +{ + $pdo->exec('CREATE UNIQUE INDEX users_username_idx ON users(username)'); +} function version_26($pdo) { diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index a7e57d66..3341d4a1 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -4,7 +4,12 @@ namespace Schema; use Core\Security; -const VERSION = 7; +const VERSION = 8; + +function version_8($pdo) +{ + $pdo->exec('CREATE UNIQUE INDEX users_username_idx ON users(username)'); +} function version_7($pdo) { diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index cab69fa0..108c07f2 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -4,7 +4,12 @@ namespace Schema; use Core\Security; -const VERSION = 26; +const VERSION = 27; + +function version_27($pdo) +{ + $pdo->exec('CREATE UNIQUE INDEX users_username_idx ON users(username)'); +} function version_26($pdo) { |