diff options
author | Frédéric Guillot <fguillot@users.noreply.github.com> | 2014-03-09 23:21:23 -0400 |
---|---|---|
committer | Frédéric Guillot <fguillot@users.noreply.github.com> | 2014-03-09 23:21:23 -0400 |
commit | 7749b8ed569f6d27b0bb2ed4c2040e8b61ed4422 (patch) | |
tree | ee101992e87d740bdf0362e35ea040c866986f5a /models/schema.php | |
parent | 7bd4697dfca41a21f5857f83d6b29108fafb9a1e (diff) |
Automatic actions
Diffstat (limited to 'models/schema.php')
-rw-r--r-- | models/schema.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/models/schema.php b/models/schema.php index 14604e60..621bc981 100644 --- a/models/schema.php +++ b/models/schema.php @@ -2,6 +2,29 @@ namespace Schema; +function version_10($pdo) +{ + $pdo->exec( + 'CREATE TABLE actions ( + id INTEGER PRIMARY KEY, + project_id INTEGER, + event_name TEXT, + action_name TEXT, + FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE + )' + ); + + $pdo->exec( + 'CREATE TABLE action_has_params ( + id INTEGER PRIMARY KEY, + action_id INTEGER, + name TEXT, + value TEXT, + FOREIGN KEY(action_id) REFERENCES actions(id) ON DELETE CASCADE + )' + ); +} + function version_9($pdo) { $pdo->exec("ALTER TABLE tasks ADD COLUMN date_due INTEGER"); |