summaryrefslogtreecommitdiff
path: root/app/Schema
diff options
context:
space:
mode:
Diffstat (limited to 'app/Schema')
-rw-r--r--app/Schema/Mysql.php7
-rw-r--r--app/Schema/Postgres.php7
-rw-r--r--app/Schema/Sqlite.php2
3 files changed, 13 insertions, 3 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php
index e73f6cf4..52dbea50 100644
--- a/app/Schema/Mysql.php
+++ b/app/Schema/Mysql.php
@@ -5,7 +5,12 @@ namespace Schema;
use PDO;
use Core\Security;
-const VERSION = 35;
+const VERSION = 36;
+
+function version_36($pdo)
+{
+ $pdo->exec('ALTER TABLE tasks MODIFY title VARCHAR(255) NOT NULL');
+}
function version_35($pdo)
{
diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php
index 4ec3885c..9493e60e 100644
--- a/app/Schema/Postgres.php
+++ b/app/Schema/Postgres.php
@@ -5,7 +5,12 @@ namespace Schema;
use PDO;
use Core\Security;
-const VERSION = 16;
+const VERSION = 17;
+
+function version_17($pdo)
+{
+ $pdo->exec('ALTER TABLE tasks ALTER COLUMN title SET NOT NULL');
+}
function version_16($pdo)
{
diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php
index cdc74465..82c2f41c 100644
--- a/app/Schema/Sqlite.php
+++ b/app/Schema/Sqlite.php
@@ -457,7 +457,7 @@ function version_1($pdo)
$pdo->exec("
CREATE TABLE tasks (
id INTEGER PRIMARY KEY,
- title TEXT,
+ title TEXT NOT NULL,
description TEXT,
date_creation INTEGER,
color_id TEXT,