summaryrefslogtreecommitdiff
path: root/modules/rest/helpers/rest_installer.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/rest/helpers/rest_installer.php')
-rw-r--r--modules/rest/helpers/rest_installer.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/rest/helpers/rest_installer.php b/modules/rest/helpers/rest_installer.php
index c2694a29..3c7fea4b 100644
--- a/modules/rest/helpers/rest_installer.php
+++ b/modules/rest/helpers/rest_installer.php
@@ -35,7 +35,9 @@ class rest_installer {
static function upgrade($version) {
$db = Database::instance();
if ($version == 1) {
- $db->query("RENAME TABLE {user_access_tokens} TO {user_access_keys}");
+ if (in_array("user_access_tokens", Database::instance()->list_tables())) {
+ $db->query("RENAME TABLE {user_access_tokens} TO {user_access_keys}");
+ }
module::set_version("rest", $version = 2);
}