[Vtigercrm-developers] Error during module installation
Vikas Jain
vikas at vtiger.com
Thu Oct 24 07:59:57 GMT 2013
Mariusz,
I agree this is a better solution, we will change this to use this solution.
On 24 October 2013 12:20, Mariusz Krzaczkowski
<m.krzaczkowski at opensaas.pl>wrote:
> Hi
>
> Better solution to checking for an existing table is a query (not generate
> an error):
>
> *SHOW TABLES LIKE "vtiger_account";*
>
> *Z poważaniem / Best regards*
> *Mariusz Krzaczkowski* *
> *
> *m.krzaczkowski at opensaas.pl
> www.OpenSaaS.pl <http://www.opensaas.pl/>*
>
> ---------- Wiadomość przekazana dalej ----------
>> From: Vikas Jain <vikas at vtiger.com>
>> To: vtigercrm-developers at lists.vtigercrm.com
>> Cc:
>> Date: Tue, 22 Oct 2013 17:14:05 +0530
>> Subject: Re: [Vtigercrm-developers] Error during module installation
>> Mariusz,
>> When creating any table we first check if it already exists, if it does
>> not exist then only we create the table.
>> If the table exists then we dont create the table.
>>
>> On 22 October 2013 16:28, Mariusz Krzaczkowski <
>> m.krzaczkowski at opensaas.pl> wrote:
>> Hi
>> *Why during installation module is the called query when the table does
>> not exist?* Here is an example of the log:
>> 10/22/13 10:44:56,432 [1676] INFO VT - PearDatabase ->ADODB error Query
>> Failed:SELECT 1 FROM vtiger_osspasswords LIMIT 1::->[1146]Table
>> 'vtiger6_4.vtiger_osspasswords' doesn't exist
>> 10/22/13 10:44:56,432 [1676] DEBUG VT - SQL: CREATE TABLE
>> `vtiger_osspasswords` (
>> `osspasswordsid` int(11) NOT NULL,
>> `osspassword_no` varchar(30) NOT NULL,
>> `passwordname` varchar(100) NOT NULL,
>> `username` varchar(100) NOT NULL,
>> `password` varbinary(200) NOT NULL,
>> `link_adres` varchar(100) DEFAULT NULL,
>> `linkto` varchar(100) default NULL,
>> PRIMARY KEY (`osspasswordsid`),
>> CONSTRAINT `fk_1_vtiger_osspasswords` FOREIGN KEY (`osspasswordsid`)
>> REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
>> ) ENGINE=InnoDB DEFAULT CHARSET=utf8
>> ...
>> *Z poważaniem / Best regards*
>> *Mariusz Krzaczkowski*
>> *m.krzaczkowski at opensaas.pl*
>> _______________________________________________
>> http://www.vtiger.com/
>>
>>
>> --
>> Regards
>> Vikas
>> Vtiger Team
>>
> 10/22/13 10:44:56,431 [1676] DEBUG VT - Prepared sql query being
>>> executed : SELECT 1 FROM vtiger_osspasswords LIMIT 1
>>>
>>
> _______________________________________________
> http://www.vtiger.com/
>
--
Regards
Vikas
Vtiger Team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20131024/d4a3b487/attachment-0001.html>
More information about the vtigercrm-developers
mailing list