diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-03-07 16:50:36 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-03-07 16:50:36 -0500 |
commit | 732899564517c6efd9ef965f3f843309a222ce50 (patch) | |
tree | bc49df0d3685c6f6447b4e74146ef3f8bc8aa730 /app/Schema/Mysql.php | |
parent | 313318a40da51575212c8d299fa1b2ed4c83ca1b (diff) |
Add user cost
Diffstat (limited to 'app/Schema/Mysql.php')
-rw-r--r-- | app/Schema/Mysql.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index 21c304c1..a4b8c25a 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -6,7 +6,20 @@ use PDO; use Core\Security; use Model\Link; -const VERSION = 49; +const VERSION = 50; + +function version_50($pdo) +{ + $pdo->exec("CREATE TABLE hourly_rates ( + id INT NOT NULL AUTO_INCREMENT, + user_id INT NOT NULL, + rate FLOAT DEFAULT 0, + date_effective INTEGER NOT NULL, + currency TEXT NOT NULL, + FOREIGN KEY(user_id) REFERENCES users(id) ON DELETE CASCADE, + PRIMARY KEY(id) + ) ENGINE=InnoDB CHARSET=utf8"); +} function version_49($pdo) { |