diff options
author | Kyle McFarland <tfkyle@gmail.com> | 2018-01-31 00:51:07 -0600 |
---|---|---|
committer | Kyle McFarland <tfkyle@gmail.com> | 2018-01-31 00:51:07 -0600 |
commit | 61d1aa04d8d44b17bfe6dace90088669fc6c3df8 (patch) | |
tree | 7ede15c880e4c41a18cded46fe6d03fb2dc4543b /common/tables/tcc_history.php | |
download | mcoop-61d1aa04d8d44b17bfe6dace90088669fc6c3df8.zip mcoop-61d1aa04d8d44b17bfe6dace90088669fc6c3df8.tar.gz mcoop-61d1aa04d8d44b17bfe6dace90088669fc6c3df8.tar.bz2 |
* Registration system's almost done
* Just part way through implementing tasks
So not much done yet, but it's a start.
Diffstat (limited to 'common/tables/tcc_history.php')
-rw-r--r-- | common/tables/tcc_history.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/common/tables/tcc_history.php b/common/tables/tcc_history.php new file mode 100644 index 0000000..362d702 --- /dev/null +++ b/common/tables/tcc_history.php @@ -0,0 +1,31 @@ +<?php +namespace mcoop; +require_once("common/db_classes.php"); + +// tcc stands for Task Claim Credits + +class TccHistoryUpgrader extends BaseIncrementalTableUpgrader { + function __construct($conn) { + $this->conn = $conn; + $this->table_name = "tcc_history"; + } +} + +$tcc_history_table_decl = new SimpleTableDecl( + "tcc_history", + array( + "get_tcc_history_by_claimid" => "SELECT * FROM tcc_history WHERE to_claim_id=:claimid", + "get_tcc_history_by_tdc_id" => "SELECT * FROM tcc_history WHERE from_tdc_id=:tdc_id" + ), + "CREATE TABLE `tcc_history` ( +`from_tdc_id` INT NOT NULL, +`to_claim_id` INT NOT NULL, +`action` ENUM ('award', 'rescind') NOT NULL, +`credits` BIGINT NOT NULL, +`last_updated_table_version` INT NOT NULL +);", + 1, + "\mcoop\TccHistoryUpgrader" +); + +?> |