From b8fa0246803dab40cf57d40b45984c53046f2d55 Mon Sep 17 00:00:00 2001 From: "Dzial Techniczny WMW Projekt s.c" Date: Tue, 10 Dec 2019 11:34:53 +0100 Subject: Plugins directory and local modifications --- plugins/Group_assign/Schema/Mysql.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 plugins/Group_assign/Schema/Mysql.php (limited to 'plugins/Group_assign/Schema/Mysql.php') diff --git a/plugins/Group_assign/Schema/Mysql.php b/plugins/Group_assign/Schema/Mysql.php new file mode 100644 index 00000000..17318a29 --- /dev/null +++ b/plugins/Group_assign/Schema/Mysql.php @@ -0,0 +1,34 @@ +exec("ALTER TABLE `tasks` ADD COLUMN `owner_ms` INT DEFAULT '0'"); + + $pdo->exec(" + CREATE TABLE `multiselect` ( + id INT NOT NULL AUTO_INCREMENT, + external_id VARCHAR(255) DEFAULT '', + PRIMARY KEY(id) + ) ENGINE=InnoDB CHARSET=utf8 + "); + $pdo->exec(" + CREATE TABLE multiselect_has_users ( + group_id INT NOT NULL, + user_id INT NOT NULL, + FOREIGN KEY(group_id) REFERENCES `multiselect`(id) ON DELETE CASCADE, + FOREIGN KEY(user_id) REFERENCES users(id) ON DELETE CASCADE, + UNIQUE(group_id, user_id) + ) ENGINE=InnoDB CHARSET=utf8 + "); +} + +function version_1(PDO $pdo) +{ + $pdo->exec("ALTER TABLE `tasks` ADD COLUMN `owner_gp` INT DEFAULT '0'"); +} -- cgit v1.2.3