Letters table missing

QuestionsCategory: TroubleshootingLetters table missing
Bradley Priebe asked 1 month ago

There was an error reading from the database: Table ‘Collectionsmax.letters’ does not exist.   if I look at the database the table is not showing, but if I try to run the script from the blank database to create the table it says it already exists.

1 Answers
support Staff answered 1 month ago

If you run the below script it will create the table even if it exists.  As an fyi….these type of questions are better suited to be asked in a support ticket instead of in this Q & A forum.

DROP TABLE IF EXISTS `letters`;
CREATE TABLE `letters` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`maindatabaseid` int(10) unsigned DEFAULT NULL,
`filenumber` varchar(200) DEFAULT NULL,
`title` varchar(45) DEFAULT NULL,
`firstname` varchar(200) DEFAULT NULL,
`middlename` varchar(250) DEFAULT NULL,
`lastname` varchar(200) DEFAULT NULL,
`fullname` varchar(250) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`address2` varchar(250) DEFAULT NULL,
`city` varchar(200) DEFAULT NULL,
`state` varchar(200) DEFAULT NULL,
`zip` varchar(50) DEFAULT NULL,
`socialsecuritynumber` varchar(50) DEFAULT NULL,
`creditor` varchar(200) DEFAULT NULL,
`debttype` varchar(200) DEFAULT NULL,
`originalbalance` varchar(50) DEFAULT NULL,
`originalbalanceformat` varchar(50) DEFAULT NULL,
`accountnumber` varchar(200) DEFAULT NULL,
`lastpaymentamount` varchar(50) DEFAULT NULL,
`lastpaymentamountformat` varchar(50) DEFAULT NULL,
`lastpaymentdate` varchar(100) DEFAULT NULL,
`currentbalance` varchar(100) DEFAULT NULL,
`currentbalanceformat` varchar(100) DEFAULT NULL,
`letterdate` date NOT NULL DEFAULT ‘0000-00-00’,
`letterdateformat` varchar(50) DEFAULT NULL,
`lettername` varchar(200) DEFAULT NULL,
`makepayableto` varchar(255) DEFAULT NULL,
`letterstatus` varchar(100) DEFAULT NULL,
`lettermonth` varchar(50) DEFAULT NULL,
`letterday` varchar(50) DEFAULT NULL,
`letteryear` varchar(255) DEFAULT NULL,
`addressfull` varchar(255) DEFAULT NULL,
`promiseamount` varchar(45) DEFAULT NULL,
`promiseamountformat` varchar(45) DEFAULT NULL,
`promisedate` varchar(45) DEFAULT NULL,
`promisedateformat` varchar(45) DEFAULT NULL,
`promiseid` varchar(45) DEFAULT NULL,
`barcode` varchar(200) DEFAULT NULL,
`sentto` varchar(250) DEFAULT NULL,
`pplandownpayment` varchar(45) DEFAULT NULL,
`pplandownpaymentformat` varchar(45) DEFAULT NULL,
`pplannumberofpayments` varchar(45) DEFAULT NULL,
`pplanpaymentamount` varchar(45) DEFAULT NULL,
`pplanpaymentamountformat` varchar(45) DEFAULT NULL,
`pplandatedue` varchar(45) DEFAULT NULL,
`settlementamount` varchar(45) DEFAULT NULL,
`settlementamountformat` varchar(45) DEFAULT NULL,
`settlementdatedue` varchar(45) DEFAULT NULL,
`datedue` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;