[PROBLEM] DB Credit installation -> SQL error: xf_dbtech_credits_currency does not exist

Wolf Knight

+Lifetime VIP+
+Lifetime VIP+
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Jul 3, 2019
Messages
208
Points
53

Reputation:

Hello
How can I insert a table in the xenforo database?
I am trying to install the addon but it gave me an error telling me that:
xf_dbtech_credits_currency does not exist.
Can I add it manually?
Thank you.
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,533
Points
523

Reputation:

which addon you want to install, which version of DB Credits you are using?
 

Wolf Knight

+Lifetime VIP+
+Lifetime VIP+
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Jul 3, 2019
Messages
208
Points
53

Reputation:

which addon you want to install, which version of DB Credits you are using?
BattleKingI am trying to install this addon

DragonByte Credits 5.7.7​


This is the error I am getting:
  • XF\Db\Exception: Batch install error: MySQL statement prepare error [1146]: Table 'database_name.xf_dbtech_credits_currency' doesn't exist
  • src/XF/Db/AbstractStatement.php:230
SELECT `xf_dbtech_credits_currency`.*
FROM `xf_dbtech_credits_currency`



MySQL version 10.5
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,533
Points
523

Reputation:

I am trying to install this addon

DragonByte Credits 5.7.7​


This is the error I am getting:
  • XF\Db\Exception: Batch install error: MySQL statement prepare error [1146]: Table 'database_name.xf_dbtech_credits_currency' doesn't exist
  • src/XF/Db/AbstractStatement.php:230
SELECT `xf_dbtech_credits_currency`.*
FROM `xf_dbtech_credits_currency`



MySQL version 10.5
Wolf KnightSo you want to install the credit system or is it an update?
 

Soft4Win

Developer
Staff member
Moderator
Collaborate
Registered
Joined
Apr 27, 2019
Messages
368
Points
103

Reputation:

I would recommend you to try installing again, something wrong is over there, as that's the main table which is used by DBTech Credits , so that should be Added by the addon at first on its own. If it still doesn't work, try an older version of addon, which you can look over here : https://enxf.net/resources/dbtech-dragonbyte-credits.776/history
 

Wolf Knight

+Lifetime VIP+
+Lifetime VIP+
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Jul 3, 2019
Messages
208
Points
53

Reputation:

I would recommend you to try installing again, something wrong is over there, as that's the main table which is used by DBTech Credits , so that should be Added by the addon at first on its own. If it still doesn't work, try an older version of addon, which you can look over here : https://enxf.net/resources/dbtech-dragonbyte-credits.776/history
Soft4WinI was use it before and everything was working normally, I tried to upgrade it to the last version then I got many errors.
Now when I am trying to install any newer version or older it gives me this error mentioned above, and shows me the version 5.7.7
 

Soft4Win

Developer
Staff member
Moderator
Collaborate
Registered
Joined
Apr 27, 2019
Messages
368
Points
103

Reputation:

If you want to manually create it, you can do it, but it contains many fields, so you can use phpmyadmin or something to add them. But that is not advisable, Highly recommend looking into older version instead, or a newer version.
 

Attachments

  • enxf 2.jpg
    enxf 2.jpg
    179.9 KB · Views: 148

Wolf Knight

+Lifetime VIP+
+Lifetime VIP+
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Jul 3, 2019
Messages
208
Points
53

Reputation:

If you want to manually create it, you can do it, but it contains many fields, so you can use phpmyadmin or something to add them. But that is not advisable, Highly recommend looking into older version instead, or a newer version.
Soft4WinI think that all tables of the addon are installed only the one

  • XF\Db\Exception: Batch install error: MySQL statement prepare error [1146]: Table 'xxxxx.xf_dbtech_credits_currency' doesn't exist

  • src/XF/Db/AbstractStatement.php:230

Screen Shot 2022-07-14 at 3.08.07 PM.jpg
 
View previous replies…

Soft4Win

Developer
Staff member
Moderator
Collaborate
Registered
Joined
Apr 27, 2019
Messages
368
Points
103

Reputation:

I think that all tables of the addon are installed only the one

  • XF\Db\Exception: Batch install error: MySQL statement prepare error [1146]: Table 'xxxxx.xf_dbtech_credits_currency' doesn't exist

  • src/XF/Db/AbstractStatement.php:230

View attachment 29701
Wolf KnightWell this is a different thing, it shows the extension detail.

So you can try this code, and see if things works after this, this code will install the currency table for you. But I can't guarantee full success. And also make sure to take a backup of your forum.

SQL:
CREATE TABLE `xf_dbtech_credits_currency` (
    `currency_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    `title` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `description` BLOB NULL DEFAULT NULL,
    `active` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `display_order` INT(10) UNSIGNED NOT NULL DEFAULT '0',
    `table` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `use_table_prefix` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `column` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `use_user_id` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `user_id_column` VARCHAR(255) NOT NULL DEFAULT 'user_id' COLLATE 'utf8mb4_general_ci',
    `decimals` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `privacy` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `blacklist` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `prefix` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `suffix` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `negative` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `maxtime` INT(10) UNSIGNED NOT NULL DEFAULT '0',
    `earnmax` DOUBLE UNSIGNED NOT NULL DEFAULT '0',
    `value` DOUBLE NOT NULL DEFAULT '1',
    `inbound` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `outbound` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `is_display_currency` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `sidebar` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `postbit` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `member_dropdown` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    PRIMARY KEY (`currency_id`) USING BTREE,
    INDEX `active` (`active`) USING BTREE
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=2
;
 

Wolf Knight

+Lifetime VIP+
+Lifetime VIP+
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Jul 3, 2019
Messages
208
Points
53

Reputation:

Well this is a different thing, it shows the extension detail.

So you can try this code, and see if things works after this, this code will install the currency table for you. But I can't guarantee full success. And also make sure to take a backup of your forum.

SQL:
CREATE TABLE `xf_dbtech_credits_currency` (
    `currency_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    `title` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `description` BLOB NULL DEFAULT NULL,
    `active` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `display_order` INT(10) UNSIGNED NOT NULL DEFAULT '0',
    `table` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `use_table_prefix` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `column` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `use_user_id` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `user_id_column` VARCHAR(255) NOT NULL DEFAULT 'user_id' COLLATE 'utf8mb4_general_ci',
    `decimals` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `privacy` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `blacklist` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `prefix` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `suffix` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `negative` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `maxtime` INT(10) UNSIGNED NOT NULL DEFAULT '0',
    `earnmax` DOUBLE UNSIGNED NOT NULL DEFAULT '0',
    `value` DOUBLE NOT NULL DEFAULT '1',
    `inbound` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `outbound` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `is_display_currency` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `sidebar` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `postbit` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `member_dropdown` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    PRIMARY KEY (`currency_id`) USING BTREE,
    INDEX `active` (`active`) USING BTREE
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=2
;
Soft4WinYou are super amazing
It is installed now.
I will try it and check all its options.
Many thanks
 

Wolf Knight

+Lifetime VIP+
+Lifetime VIP+
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Jul 3, 2019
Messages
208
Points
53

Reputation:

Well this is a different thing, it shows the extension detail.

So you can try this code, and see if things works after this, this code will install the currency table for you. But I can't guarantee full success. And also make sure to take a backup of your forum.

SQL:
CREATE TABLE `xf_dbtech_credits_currency` (
    `currency_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    `title` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `description` BLOB NULL DEFAULT NULL,
    `active` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `display_order` INT(10) UNSIGNED NOT NULL DEFAULT '0',
    `table` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `use_table_prefix` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `column` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `use_user_id` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `user_id_column` VARCHAR(255) NOT NULL DEFAULT 'user_id' COLLATE 'utf8mb4_general_ci',
    `decimals` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `privacy` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `blacklist` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `prefix` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `suffix` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `negative` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `maxtime` INT(10) UNSIGNED NOT NULL DEFAULT '0',
    `earnmax` DOUBLE UNSIGNED NOT NULL DEFAULT '0',
    `value` DOUBLE NOT NULL DEFAULT '1',
    `inbound` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `outbound` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `is_display_currency` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `sidebar` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `postbit` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `member_dropdown` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    PRIMARY KEY (`currency_id`) USING BTREE,
    INDEX `active` (`active`) USING BTREE
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=2
;
Soft4WinI found this error now
  • XF\Db\Exception: MySQL statement prepare error [1146]: Table 'xxxxx.xf_dbtech_credits_event' doesn't exist
  • src/XF/Db/AbstractStatement.php:230
 

Soft4Win

Developer
Staff member
Moderator
Collaborate
Registered
Joined
Apr 27, 2019
Messages
368
Points
103

Reputation:

@Soft4Win
I think we need to insert this table as well
Wolf KnightTo me it looks like, the addon was previously half installed, so its causing issues this time around, or a version of it is already installed, but the DB is not present for that, you should try uninstalling the older version if exists any and do a fresh installation afterwards. Because, manually you might have to install one table after another and so on.
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,533
Points
523

Reputation:

To me it looks like, the addon was previously half installed, so its causing issues this time around, or a version of it is already installed, but the DB is not present for that, you should try uninstalling the older version if exists any and do a fresh installation afterwards. Because, manually you might have to install one table after another and so on.
Soft4WinBut if you uninstall, you will loose all the earned credits of the users!
 

Soft4Win

Developer
Staff member
Moderator
Collaborate
Registered
Joined
Apr 27, 2019
Messages
368
Points
103

Reputation:

But if you uninstall, you will loose all the earned credits of the users!
BattleKingI don't think there will be any credits either ways, if there is no table for currency and events. But in case there are then, in that case it has to be installed carefully, to avoid the loss of data.
 

Soft4Win

Developer
Staff member
Moderator
Collaborate
Registered
Joined
Apr 27, 2019
Messages
368
Points
103

Reputation:

Let us insert this missing table and try dbtech_credits_event
Wolf KnightYou can try this code for that:


SQL:
CREATE TABLE `xf_dbtech_credits_event` (
    `event_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    `title` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `active` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `currency_id` INT(10) UNSIGNED NOT NULL,
    `event_trigger_id` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `user_group_ids` BLOB NULL DEFAULT NULL,
    `node_ids` BLOB NULL DEFAULT NULL,
    `moderate` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `charge` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `main_add` DOUBLE NOT NULL DEFAULT '0',
    `main_sub` DOUBLE NOT NULL DEFAULT '0',
    `mult_add` DOUBLE NOT NULL DEFAULT '0',
    `mult_sub` DOUBLE NOT NULL DEFAULT '0',
    `delay` INT(10) UNSIGNED NOT NULL DEFAULT '0',
    `frequency` INT(10) UNSIGNED NOT NULL DEFAULT '1',
    `maxtime` INT(10) UNSIGNED NOT NULL DEFAULT '0',
    `applymax` INT(10) UNSIGNED NOT NULL DEFAULT '0',
    `applymax_peruser` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `upperrand` DOUBLE NOT NULL DEFAULT '0',
    `multmin` DOUBLE NOT NULL DEFAULT '0',
    `multmax` DOUBLE NOT NULL DEFAULT '0',
    `minaction` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `owner` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `curtarget` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `alert` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
    `display` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
    `settings` MEDIUMBLOB NULL DEFAULT NULL,
    PRIMARY KEY (`event_id`) USING BTREE,
    INDEX `transaction_display` (`active`, `display`) USING BTREE
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=4
;
 
Top