[FIX] shares_archive table
This commit is contained in:
parent
9a3791bd42
commit
18621d492a
@ -155,8 +155,8 @@ CREATE TABLE IF NOT EXISTS `shares` (
|
|||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `shares_archive` (
|
CREATE TABLE IF NOT EXISTS `shares_archive` (
|
||||||
`id` bigint(30) NOT NULL AUTO_INCREMENT,
|
`id` bigint(30) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`share_id` bigint(30) NOT NULL,
|
`share_id` bigint(30) unsigned NOT NULL,
|
||||||
`username` varchar(120) NOT NULL,
|
`username` varchar(120) NOT NULL,
|
||||||
`our_result` enum('Y','N') DEFAULT NULL,
|
`our_result` enum('Y','N') DEFAULT NULL,
|
||||||
`upstream_result` enum('Y','N') DEFAULT NULL,
|
`upstream_result` enum('Y','N') DEFAULT NULL,
|
||||||
|
|||||||
@ -9,8 +9,8 @@ function run_0011() {
|
|||||||
$db_version_now = $setting->getValue('DB_VERSION'); // Our actual version installed
|
$db_version_now = $setting->getValue('DB_VERSION'); // Our actual version installed
|
||||||
|
|
||||||
// Upgrade specific variables
|
// Upgrade specific variables
|
||||||
$aSql[] = "ALTER TABLE `shares_archive` MODIFY `id` bigint(30)";
|
$aSql[] = "ALTER TABLE `shares_archive` CHANGE `id` `id` BIGINT(30) unsigned NOT NULL AUTO_INCREMENT";
|
||||||
$aSql[] = "ALTER TABLE `shares_archive` MODIFY `share_id` bigint(30)";
|
$aSql[] = "ALTER TABLE `shares_archive` CHANGE `share_id` `share_id` BIGINT(30) unsigned NOT NULL";
|
||||||
$aSql[] = "UPDATE " . $setting->getTableName() . " SET value = '0.0.11' WHERE name = 'DB_VERSION'";
|
$aSql[] = "UPDATE " . $setting->getTableName() . " SET value = '0.0.11' WHERE name = 'DB_VERSION'";
|
||||||
|
|
||||||
if ($db_version_now == $db_version_old && version_compare($db_version_now, DB_VERSION, '<')) {
|
if ($db_version_now == $db_version_old && version_compare($db_version_now, DB_VERSION, '<')) {
|
||||||
@ -22,10 +22,4 @@ function run_0011() {
|
|||||||
if ($stmt && $stmt->execute()) {
|
if ($stmt && $stmt->execute()) {
|
||||||
echo '- success' . PHP_EOL;
|
echo '- success' . PHP_EOL;
|
||||||
} else {
|
} else {
|
||||||
echo '- failed: ' . $mysqli->error . PHP_EOL;
|
echo '- failed: ' . $mysqli->e
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
Loading…
Reference in New Issue
Block a user