From 732899564517c6efd9ef965f3f843309a222ce50 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 7 Mar 2015 16:50:36 -0500 Subject: Add user cost --- app/Schema/Mysql.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'app/Schema/Mysql.php') 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) { -- cgit v1.2.3