So in templates/sql/db-init/mysql/createdb.vm I put instructions to skip the database named "default" and it works fine now.
#foreach ($databaseName in $databaseNames) #if ( $databaseName != "default" ) drop database if exists $databaseName; create database $databaseName; #end #end Thanks for the help However, I still wonder why torques tries to generate a database named "default". Frederic Andrew Ballanger wrote: > If you do not use the id-broker you can probably drop the id-table schema > completely. Otherwise if you are using it you may want to add the things > from in there to your sumo database if that is the only place you use the > id-broker, then delete the id-table schema. This "might" be the the problem. > I am not sure as I have not used Torque since the builds went away from > using ANT. But I seem to remember problems that were solved by taking the > steps I mentioned earlier. > > ----- Original Message ----- > From: "Frederic Gedin" <[EMAIL PROTECTED]> > To: "Turbine Torque Users List" <[EMAIL PROTECTED]> > Sent: Friday, July 12, 2002 9:31 AM > Subject: Re: Default database generated by Torque > > > >>The schema directory contains two files: my database schema and the >>id-table schema. >> >>The generated sql files are: >>create-db.sql >>sumo-schema.sql >>id-table-schema.sql >>mysql-id-table-init.sql >>xptool-schema-idtable-init.sql >> >>I am afraid the error is not here! >> >>Frederic >> >> >> >>Nicholas Wheeler wrote: >> >> >>>Frederic >>> >>>Have you looked in the schema directory to see if there is another >>>some_database_name-schema.xml file under /schema or perhaps something in >>>the generated SQL under src/sql/ ? Torque just looks for all files >>>*-schema.xml and I believe excutes all .sql that it can find in those >>>directories. I am grasping at straws here. >>> >>>-Nicholas >>> >>>At 04:00 PM 7/12/2002 +0200, you wrote: >>> >>> >>>>Hi Nicholas >>>> >>>> >>>>Extract from my sumo-schema.xml file: >>>><database name="sumo" package="org.jaluna.sumo.om"> >>>> >>>> >>>>Extract from my Torque.properties file >>>>torque.database.default=sumo >>>>torque.database.sumo.driver = org.gjt.mm.mysql.Driver >>>>torque.database.sumo.url = jdbc:mysql://127.0.0.1/sumo >>>>torque.database.sumo.username = root >>>>torque.database.sumo.password = >>>> >>>>As you see, it seems to be correct. >>>>By the way, I tried to elimite the line "torque.database.default=sumo" >>>>but it did not change anything. >>>> >>>>Frederic >>>> >>>> >>>> >>>>Nicholas Wheeler wrote: >>>> >>>> >>>>>In your sumo-schema.xml file you need to be sure and name the >>>>>database there. >>>>>EX: <database name="sumo"> >>>>>Then also in your Torque.properties specify >>>>>torque.database.default=sumo >>>>>torque.database.sumo.driver = >>>>>... >>>>>At 03:11 PM 7/12/2002 +0200, you wrote: >>>>> >>>>> >>>>>>Hi Roy >>>>>> >>>>>>Thank you for your hint. >>>>>>Unless I am wrong, there is nothing in my configs which specified de >>>>>>database named "default" to be created. These config files have >>>>>>been taken from the binary distribution of torque-3.0-b2. I tried >>>>>>also "ant -f build-torque project-create-db" in the torque directory >>>>>>and the create-db.sql contains lines related to the "default" >>>>>> > database. > >>>>>>Anyway, I followed your idea of updating createdb.vm >>>>>> and it's fine now. >>>>>> >>>>>>Frederic >>>>>> >>>>>> >>>>>>Roy Truelove wrote: >>>>>> >>>>>> >>>>>>>Hey Frederic, >>>>>>> It seems that somewhere in the configs you have specificed a >>>>>>>database >>>>>>>named "default".. I'd do a text search on the config files and see >>>>>>>where it >>>>>>>might be popping up. If you actually do want a db named default, >>>>>>>then take >>>>>>>a look at the createdb.vm file under Torque's templates\sql\db-init >>>>>>>directory for your specific database. If you edit that as needed, >>>>>>>torque >>>>>>>should skip the steps you'd like to skip. >>>>>>>Take it easy, >>>>>>>Roy >>>>>>>----- Original Message ----- >>>>>>>From: "Frederic Gedin" <[EMAIL PROTECTED]> >>>>>>>To: <[EMAIL PROTECTED]> >>>>>>>Sent: Thursday, July 11, 2002 3:23 AM >>>>>>>Subject: Default database generated by Torque >>>>>>> >>>>>>> >>>>>>> >>>>>>>>Hello >>>>>>>> >>>>>>>> >>>>>>>>I started a brand new project and decided for this to start with >>>>>>>> > the > >>>>>>>>decoupled version of torque (3.0-b2). >>>>>>>> >>>>>>>>Everything works fine except that the target "project-create-db" >>>>>>>>generates instructions to create a database name "default" in >>>>>>>>addition >>>>>>>>to the creation of my application database. >>>>>>>> >>>>>>>>create-db.sql: >>>>>>>>drop database if exists default; <-- I don't need this one >>>>>>>>create database default; <-- This one generates a syntax >>>>>>>>error >>>>>>>>drop database if exists sumo; <-- This is my database, it's OK >>>>>>>>create database sumo; >>>>>>>> >>>>>>>>Creation messages: >>>>>>>> [sql] Failed to execute: drop database if exists default >>>>>>>> [sql] java.sql.SQLException: Syntax error or access >>>>>>>> > violation: > >>>>>>>>You have an error in your SQL syntax near 'default' at line 1 >>>>>>>> [sql] Failed to execute: create database default >>>>>>>> [sql] java.sql.SQLException: Syntax error or access >>>>>>>> > violation: > >>>>>>>>You have an error in your SQL syntax near 'default' at line 1 >>>>>>>> [sql] 2 of 4 SQL statements executed successfully >>>>>>>> >>>>>>>> >>>>>>>>Is there a way to avoid such a behavior? >>>>>>>> >>>>>>>>Frederic >>>>>>>> >>>>>>>> >>>>>>>>-- >>>>>>>>To unsubscribe, e-mail: >>>>>>>> >>>>>>> >>>>>>><mailto:[EMAIL PROTECTED]> >>>>>>> >>>>>>>>For additional commands, e-mail: >>>>>>>> >>>>>>> >>>>>>><mailto:[EMAIL PROTECTED]> >>>>>>> >>>>>>>-- >>>>>>>To unsubscribe, e-mail: >>>>>>><mailto:[EMAIL PROTECTED]> >>>>>>>For additional commands, e-mail: >>>>>>><mailto:[EMAIL PROTECTED]> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>-- >>>>>>To unsubscribe, e-mail: >>>>>><mailto:[EMAIL PROTECTED]> >>>>>>For additional commands, e-mail: >>>>>><mailto:[EMAIL PROTECTED]> >>>>>> >>>>> >>>>>-- To unsubscribe, e-mail: >>>>><mailto:[EMAIL PROTECTED]> >>>>>For additional commands, e-mail: >>>>><mailto:[EMAIL PROTECTED]> >>>>> >>>> >>>> >>>> >>>>-- >>>>To unsubscribe, e-mail: >>>><mailto:[EMAIL PROTECTED]> >>>>For additional commands, e-mail: >>>><mailto:[EMAIL PROTECTED]> >>>> >>> >>> >>>-- >>>To unsubscribe, e-mail: >>><mailto:[EMAIL PROTECTED]> >>>For additional commands, e-mail: >>><mailto:[EMAIL PROTECTED]> >>> >> >> >>-- >>To unsubscribe, e-mail: >> > <mailto:[EMAIL PROTECTED]> > >>For additional commands, e-mail: >> > <mailto:[EMAIL PROTECTED]> > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
