Add email notifications

This commit is contained in:
Frédéric Guillot
2014-08-15 17:23:41 -07:00
parent c539bdc8ab
commit 9eeded33f6
240 changed files with 23410 additions and 308 deletions

View File

@@ -4,7 +4,22 @@ namespace Schema;
use Core\Security;
const VERSION = 22;
const VERSION = 23;
function version_23($pdo)
{
$pdo->exec("ALTER TABLE users ADD COLUMN notifications_enabled INTEGER DEFAULT '0'");
$pdo->exec("
CREATE TABLE user_has_notifications (
user_id INTEGER,
project_id INTEGER,
FOREIGN KEY(user_id) REFERENCES users(id) ON DELETE CASCADE,
FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE,
UNIQUE(project_id, user_id)
);
");
}
function version_22($pdo)
{