summaryrefslogtreecommitdiff
path: root/app/Schema/Postgres.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Schema/Postgres.php')
-rw-r--r--app/Schema/Postgres.php36
1 files changed, 11 insertions, 25 deletions
diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php
index a5d28dcf..e7422e8c 100644
--- a/app/Schema/Postgres.php
+++ b/app/Schema/Postgres.php
@@ -6,7 +6,17 @@ use PDO;
use Core\Security;
use Model\Link;
-const VERSION = 66;
+const VERSION = 67;
+
+function version_67($pdo)
+{
+ $pdo->exec("
+ CREATE TABLE plugin_schema_versions (
+ plugin VARCHAR(80) NOT NULL PRIMARY KEY,
+ version INTEGER NOT NULL DEFAULT 0
+ )
+ ");
+}
function version_66($pdo)
{
@@ -305,18 +315,6 @@ function version_34($pdo)
$pdo->exec("ALTER TABLE subtask_time_tracking ADD COLUMN time_spent REAL DEFAULT 0");
}
-function version_33($pdo)
-{
- $pdo->exec('CREATE TABLE budget_lines (
- "id" SERIAL PRIMARY KEY,
- "project_id" INTEGER NOT NULL,
- "amount" REAL NOT NULL,
- "date" VARCHAR(10) NOT NULL,
- "comment" TEXT,
- FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE
- )');
-}
-
function version_32($pdo)
{
$pdo->exec('CREATE TABLE timetable_day (
@@ -359,18 +357,6 @@ function version_32($pdo)
)');
}
-function version_31($pdo)
-{
- $pdo->exec("CREATE TABLE hourly_rates (
- id SERIAL PRIMARY KEY,
- user_id INTEGER NOT NULL,
- rate REAL DEFAULT 0,
- date_effective INTEGER NOT NULL,
- currency CHAR(3) NOT NULL,
- FOREIGN KEY(user_id) REFERENCES users(id) ON DELETE CASCADE
- )");
-}
-
function version_30($pdo)
{
$pdo->exec('ALTER TABLE subtasks ADD COLUMN position INTEGER DEFAULT 1');