Nope, that doesn't work either. Must be a security issue or something :
(

Ah well.

On 28 July, 13:05, Gareth McCumskey <gmccums...@gmail.com> wrote:
> Instead of trying to run the symfony/propel command try running the mysql 
> command to insert that sql:
>
> mysql database_name < /path/to/project/data/saql/lib.model.schema.sql
>
> Perhaps that will help more :)
>
> ----- Original Message -----
> From: "Stephen Melrose" <step...@sekka.co.uk>
> To: "symfony users" <symfony-users@googlegroups.com>
> Sent: Tuesday, July 28, 2009 12:46:40 PM GMT +02:00 Harare / Pretoria
> Subject: [symfony-users] Re: Propel Unit Testing - Reset database before 
> running  sfPropelData()?
>
> Balls
>
> Uncaught exception 'PropelException' with message 'Cannot insert a
> value for auto-increment primary key (badword_list_group.ID)'
>
> :/
>
> On 28 July, 11:29, Gábor Fási <maerl...@gmail.com> wrote:
> > Did not try it, but should work: add those data (including their ids)
> > to your fixtures, they should get inserted as long as there's no key
> > conflict, and you can be sure what the ids are.
>
> > On Tue, Jul 28, 2009 at 12:14, Stephen Melrose<step...@sekka.co.uk> wrote:
>
> > > Hey,
>
> > > I am just setting up, or at least trying to set up, some Propel unit
> > > tests for an application we're developing.
>
> > > I've read the documentation online and I see how this is done and how
> > > you load test data, however I have a problem in that some of our
> > > database tables contain static data purely for reference and to reduce
> > > duplication.
>
> > > For performance, we have hard coded the IDs of this data into the
> > > relevant model classes as constants, because they are after all
> > > constant data.
>
> > > Here in lies the problem. If I run my unit tests multiple times,
> > > although the sfPropelData object wipes the database, it doesn't reset
> > > the primary key auto increment, and it throws off our application.
>
> > > Does anyone know how to do this?
>
> > > Ideally, would would be best is to run a propel:insert-sql to
> > > completely reset the database, then load the data in. I tried doing
> > > this using exec() and shell_exec(), but all I got was an output of
> > > "Could not start" from the CLI.
>
> > > Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to