conn->exec("ALTER TABLE dividend_ ADD COLUMN (test BOOL)"); // No actual changes in this one, it was just to make sure the upgrader paths were working } function __construct($conn) { $this->conn = $conn; $this->table_name = "dividend_credits"; //$this->upgrade_method_names[2] = "from_1_to_2"; } } $dividend_credits_table_decl = new SimpleTableDecl( "dividend_credits", array( "dividend_credits_ensure" => "INSERT IGNORE INTO dividend_credits (userid, year, credits, last_updated_table_version) VALUES (:userid, :year, 0, :table_ver)", "add_to_dividend_credits" => "UPDATE dividend_credits SET credits=credits + :amount WHERE userid=:userid AND year=:year", "remove_from_dividend_credits" => "UPDATE dividend_credits SET credits=credits - :amount WHERE userid=:userid AND year=:year", "set_dividend_credits" => "UPDATE dividend_credits SET credits=:amount WHERE userid=:userid AND year=:year" ), "CREATE TABLE `dividend_credits` ( `userid` INT NOT NULL, `year` INT NOT NULL, `credits` BIGINT NOT NULL, `last_updated_table_version` INT NOT NULL, PRIMARY KEY (`userid`, `year`) );", 1, "\mcoop\DividendCreditsUpgrader" );