diff options
Diffstat (limited to 'plugins/Customizer/Schema')
-rw-r--r-- | plugins/Customizer/Schema/Mysql.php | 23 | ||||
-rw-r--r-- | plugins/Customizer/Schema/Postgres.php | 25 | ||||
-rw-r--r-- | plugins/Customizer/Schema/Sqlite.php | 25 |
3 files changed, 73 insertions, 0 deletions
diff --git a/plugins/Customizer/Schema/Mysql.php b/plugins/Customizer/Schema/Mysql.php new file mode 100644 index 00000000..978ceb0a --- /dev/null +++ b/plugins/Customizer/Schema/Mysql.php @@ -0,0 +1,23 @@ +<?php + +namespace Kanboard\Plugin\Customizer\Schema; + +use PDO; + +const VERSION = 1; + +function version_1(PDO $pdo) +{ + $pdo->exec("CREATE TABLE customizer_files ( + id INT NOT NULL AUTO_INCREMENT, + custom_id INT NOT NULL, + name VARCHAR(255), + path VARCHAR(255), + is_image TINYINT(1) DEFAULT 0, + date INT NOT NULL DEFAULT 0, + user_id INT NOT NULL DEFAULT 0, + size INT NOT NULL DEFAULT 0, + PRIMARY KEY (id) + ) ENGINE=InnoDB CHARSET=utf8" + ); +} diff --git a/plugins/Customizer/Schema/Postgres.php b/plugins/Customizer/Schema/Postgres.php new file mode 100644 index 00000000..54568c69 --- /dev/null +++ b/plugins/Customizer/Schema/Postgres.php @@ -0,0 +1,25 @@ +<?php + +namespace Kanboard\Plugin\Customizer\Schema; + +use PDO; + +const VERSION = 1; + +function version_1(PDO $pdo) +{ + +$pdo->exec(" + CREATE TABLE customizer_files ( + id SERIAL PRIMARY KEY, + custom_id INTEGER NOT NULL, + name VARCHAR(255) NOT NULL, + path VARCHAR(255) NOT NULL, + is_image BOOLEAN DEFAULT '0', + size INTEGER DEFAULT 0 NOT NULL, + user_id INTEGER DEFAULT 0 NOT NULL, + date INTEGER DEFAULT 0 NOT NULL + )" + ); + +} diff --git a/plugins/Customizer/Schema/Sqlite.php b/plugins/Customizer/Schema/Sqlite.php new file mode 100644 index 00000000..e8da08c1 --- /dev/null +++ b/plugins/Customizer/Schema/Sqlite.php @@ -0,0 +1,25 @@ +<?php + +namespace Kanboard\Plugin\Customizer\Schema; + +use PDO; + +const VERSION = 1; + +function version_1(PDO $pdo) +{ + +$pdo->exec(" + CREATE TABLE customizer_files ( + id INTEGER PRIMARY KEY, + custom_id INTEGER NOT NULL, + name TEXT COLLATE NOCASE NOT NULL, + path TEXT NOT NULL, + is_image INTEGER DEFAULT 0, + size INTEGER DEFAULT 0 NOT NULL, + user_id INTEGER DEFAULT 0 NOT NULL, + date INTEGER DEFAULT 0 NOT NULL + )" + ); + +} |