• Support will be limited until May 1st, as I will be out of the office travelling. Thank you for your patience and understanding.

Bug missing tables

Status
Not open for further replies.

mikez006

Customer
The InnoDB file was accidentally deleted from my server and now 2 tables are missing from my database related to this credits addon.

credits_pending
credits_transaction

This is causing this error to display on my site:

Database error in vBulletin 4.2.2:

Invalid SQL:
SELECT * FROM credits_pending WHERE checkstamp <= 1430334089 AND userid = 86871 ORDER BY checkstamp ASC LIMIT 1;

MySQL Error : Table 'db_name.credits_pending' doesn't exist

I have the addon disabled currently, but I'm not sure how to fix this issue. Any help?
 
If you don't have a backup available, you won't be able to recover your transactions, you'll need to rebuild everything.

You can manually recreate the tables this way:
Code:
CREATE TABLE `credits_pending` (
  `transactionid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `eventid` int(10) unsigned NOT NULL DEFAULT '0',
  `actionid` varchar(255) NOT NULL,
  `userid` int(10) unsigned NOT NULL DEFAULT '0',
  `timestamp` int(10) unsigned NOT NULL DEFAULT '0',
  `checkstamp` int(10) unsigned NOT NULL DEFAULT '0',
  `amount` double NOT NULL DEFAULT '0',
  `referenceid` varchar(255) DEFAULT NULL,
  `forumid` int(10) unsigned NOT NULL DEFAULT '0',
  `multiplier` double NOT NULL DEFAULT '0',
  `currencyid` int(10) unsigned NOT NULL DEFAULT '0',
  `negate` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `message` text NOT NULL,
  `ownerid` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`transactionid`),
  KEY `userid` (`userid`,`checkstamp`)
) ENGINE=MyISAM

Code:
CREATE TABLE `credits_transaction` (
  `transactionid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `eventid` int(10) unsigned NOT NULL DEFAULT '0',
  `actionid` varchar(255) NOT NULL,
  `userid` int(10) unsigned NOT NULL DEFAULT '0',
  `timestamp` int(10) unsigned NOT NULL DEFAULT '0',
  `amount` double NOT NULL DEFAULT '0',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `referenceid` varchar(255) DEFAULT NULL,
  `forumid` int(10) unsigned NOT NULL DEFAULT '0',
  `ownerid` int(10) unsigned NOT NULL DEFAULT '0',
  `multiplier` double NOT NULL DEFAULT '0',
  `currencyid` int(10) unsigned NOT NULL DEFAULT '0',
  `negate` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `message` text NOT NULL,
  PRIMARY KEY (`transactionid`),
  KEY `stats` (`status`,`timestamp`,`eventid`,`userid`,`referenceid`),
  KEY `timestamp` (`timestamp`)
) ENGINE=MyISAM
 
Status
Not open for further replies.

Similar threads

Legacy vBCredits II Deluxe

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
846
Customer rating
0.00 star(s) 0 ratings
Back
Top