summaryrefslogtreecommitdiff
path: root/app/Schema
diff options
context:
space:
mode:
Diffstat (limited to 'app/Schema')
-rw-r--r--app/Schema/Mysql.php9
-rw-r--r--app/Schema/Postgres.php9
-rw-r--r--app/Schema/Sqlite.php9
3 files changed, 24 insertions, 3 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php
index e5269d93..626f7b84 100644
--- a/app/Schema/Mysql.php
+++ b/app/Schema/Mysql.php
@@ -6,7 +6,14 @@ use PDO;
use Core\Security;
use Model\Link;
-const VERSION = 61;
+const VERSION = 62;
+
+function version_62($pdo)
+{
+ $pdo->exec('ALTER TABLE files ADD COLUMN date VARCHAR(10) NOT NULL DEFAULT 0');
+ $pdo->exec('ALTER TABLE files ADD COLUMN user_id INT NOT NULL DEFAULT 0');
+ $pdo->exec('ALTER TABLE files ADD COLUMN size FLOAT NOT NULL DEFAULT 0');
+}
function version_61($pdo)
{
diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php
index 2c5e0f28..4b9752eb 100644
--- a/app/Schema/Postgres.php
+++ b/app/Schema/Postgres.php
@@ -6,7 +6,14 @@ use PDO;
use Core\Security;
use Model\Link;
-const VERSION = 42;
+const VERSION = 43;
+
+function version_43($pdo)
+{
+ $pdo->exec('ALTER TABLE files ADD COLUMN date VARCHAR(10) NOT NULL DEFAULT 0');
+ $pdo->exec('ALTER TABLE files ADD COLUMN user_id INT NOT NULL DEFAULT 0');
+ $pdo->exec('ALTER TABLE files ADD COLUMN size FLOAT NOT NULL DEFAULT 0');
+}
function version_42($pdo)
{
diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php
index b9c264bc..52a37d25 100644
--- a/app/Schema/Sqlite.php
+++ b/app/Schema/Sqlite.php
@@ -6,7 +6,14 @@ use Core\Security;
use PDO;
use Model\Link;
-const VERSION = 60;
+const VERSION = 61;
+
+function version_61($pdo)
+{
+ $pdo->exec('ALTER TABLE files ADD COLUMN date VARCHAR(10) NOT NULL DEFAULT 0');
+ $pdo->exec('ALTER TABLE files ADD COLUMN user_id INT NOT NULL DEFAULT 0');
+ $pdo->exec('ALTER TABLE files ADD COLUMN size FLOAT NOT NULL DEFAULT 0');
+}
function version_60($pdo)
{