[Vtigercrm-developers] Why include a SQL file when we don't use it?

Allan Bush allan.bush+vtiger_dev at gmail.com
Tue Feb 21 15:02:29 PST 2006


Just add the queries to populate the database into the xml file like this:

<sql>
  <descr>Insert some data into the users table.</descr>
  <query>insert into users (userName) values ( 'admin' )</query>

  <query>insert into users (userName) values ( 'Joe' )</query>
</sql>

To install the database, create a simple php file (like the one in the
current installer or see here for another example
http://phplens.com/lens/adodb/docs-datadict.htm) and run it on
install: php install.php.

On 2/21/06, Mike Fedyk <mfedyk at mikefedyk.com> wrote:
> Hi Allan,
>
> What is wanted is a way to populate the database without user
> interaction like when you are installing the Debian/Ubuntu vtigercrm
> package, for instance.
>
> What is the best way to pass that information to php/adodb from the
> command line?
>
> Allan Bush wrote:
>
> >I don't understand half of what you just said but using the adodb xml
> >file for database creation is one of the only thing this project does
> >right, please continue to use it.
> >
> >The adodb xml file it designed to be cross database compatible, the
> >only thing it depends on is adodb which is already a requirement,
> >using it will save you tons of "copy and paste" code "reuse" which
> >just leads to bugs.
> >
> >On 2/20/06, Fathi Boudra <fboudra at free.fr> wrote:
> >
> >
> >>>http://vtiger.fosslabs.com/cgi-bin/trac.cgi/changeset/3833
> >>>
> >>>The database is created from the adodb XML file (right?)
> >>>
> >>>
> >>don't know not documented.
> >>
> >>
> >>
> >>>, why do we need a SQL file in the source code ?
> >>>
> >>>
> >>i'm changing installation. to add a better multi-platform / multi-operating
> >>system support for next installer / packaging issue. I want an "install and
> >>just work" like. And an unified one for :
> >>* vtigercrm
> >>* vtiger'n go
> >>* debian/ubuntu package
> >>* vtiger addon for xampp
> >>
> >>have you got a better way to inject database ?
> >>
> >>* php code need user intervention and break "install and just work" idea.
> >>* or a specific php code to inject data but for me it's like sql file
> >>* adodb xml file ? don't know it exists, how can inject db data with this ?
> >>software dependencies ?
> >>* how to resolve multi db support like mysql posqtgresql oracle mssql ?
> >>
> >>so i used a simple sql file and use sql-client as dependencie.
> >>
> >>
> >>
> >>>Sure we can be flexible, but we don't want to add any support headaches
> >>>(sql file not updated on new release for instance).
> >>>
> >>>
> >>yes, it's more flexible and it's just a file. There's no headaches support,
> >>just putting preliminary file for an easy way to install and update.
> >>i'll update it as needed for now until i'll automate it.
> >>
> >>looking initial subject : Why include a SQL file when we don't use it ?
> >>i want to ask why include a bin directory when we don't use it ?
> >>
> >>cheers,
> >>
> >>Fathi
> >>_______________________________________________
> >>This vtiger.com email is sponsored by: Zoho Writer. Are you still using your desktop word processor for typing documents? Try the AJAX enabled, collaboration-friendly online word processor, Zoho Writer for FREE instead!
> >>http://zohowriter.com/?vt
> >>
> >>
> >>
> >
> >_______________________________________________
> >This vtiger.com email is sponsored by: Zoho Writer. Are you still using your desktop word processor for typing documents? Try the AJAX enabled, collaboration-friendly online word processor, Zoho Writer for FREE instead!
> >http://zohowriter.com/?vt
> >
> >
> >
> _______________________________________________
> This vtiger.com email is sponsored by: Zoho Writer. Are you still using your desktop word processor for typing documents? Try the AJAX enabled, collaboration-friendly online word processor, Zoho Writer for FREE instead!
> http://zohowriter.com/?vt
>




More information about the vtigercrm-developers mailing list