From 10d96bfd668f445249190c52bedb2eb0e7e9410d Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 22 Jan 2017 22:38:00 -0500 Subject: Add user invitations --- app/Schema/Postgres.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'app/Schema/Postgres.php') diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index e7f89f82..fd7ecb57 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -6,14 +6,24 @@ use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 98; +const VERSION = 99; + +function version_99(PDO $pdo) +{ + $pdo->exec(" + CREATE TABLE invites ( + email VARCHAR(255) NOT NULL, + project_id INTEGER NOT NULL, + token VARCHAR(255) NOT NULL, + PRIMARY KEY(email, token) + ) + "); +} function version_98(PDO $pdo) { $pdo->exec('ALTER TABLE "comments" ADD COLUMN date_modification BIGINT'); - $pdo->exec('UPDATE "comments" - SET date_modification = date_creation - WHERE date_modification IS NULL'); + $pdo->exec('UPDATE "comments" SET date_modification = date_creation WHERE date_modification IS NULL'); } function version_97(PDO $pdo) -- cgit v1.2.3