I think I figured out what is going on.
sfDoctrine doesn't like that I don't have an "all:"environment in my
databases.yml. Currently I just have:
dev:
doctrine:
class: sfDoctrineDatabase
param:
dsn: mysql://yaddayaddayadda
When I try to "symfony doctrine-build-sql" it throws the exception I
noted above a while back. However, if I change "dev:" to "all:" it
works fine.
I also noticed that there doesn't appear to be a way to direct
doctrine-insert-sql at a particular environment. Even if I have a
dev: in addition to all: doctrine-insert-sql will always insert it
into the all: environment.
I believe these two things are bugs.
I'm not sure if either of these issues are related to
http://trac.symfony-project.com/ticket/1921 or not though.
J
On Jan 16, 8:49 am, Jonotron <[EMAIL PROTECTED]> wrote:
> I don't know what the problem was, but I completely rebuilt my virtual
> machine that I was developing on and used Ubuntu 7.10 jeOS instead of
> Debian, and everything works fine. Ubuntu's stable repository has a
> newer version of PHP anyways, where in Debian I was using dotdeb.org
> php packages.
>
> J
>
> On Jan 11, 5:22 pm, Jonotron <[EMAIL PROTECTED]> wrote:
>
> > Well, I nuked everything, started from scratch again, re-init my
> > symfony project (1.0.10), used sfDoctrinePlugin from
> > here:http://svn.symfony-project.com/plugins/sfDoctrinePlugin/branches/1.0,
> > created a very simple schema:
>
> > Person:
> > columns:
> > title:
> > type: string(255)
>
> >doctrine-build-model works fine.
>
> >doctrine-build-sql throws exactly as above.
>
> > On Jan 11, 9:32 am, "Sadri Sahraoui" <[EMAIL PROTECTED]> wrote:
>
> > > hmm, I just can suggest to hard clean the cache and log directories,
> > > delete the generated classes inside "lib" rewrite your schema, delete
> > > and reinstall the sfDoctrinePlugin directory and finally rebuild your
> > > models and re run *-sql
>
> > > On Jan 11, 2008 8:21 PM, Jonotron <[EMAIL PROTECTED]> wrote:
>
> > > > Just ran phpinfo()
>
> > > > PDO mysql is installed. (I'm pretty sure debian's php5-mysql package
> > > > installs PDO)
>
> > > > On Jan 11, 9:08 am, "Sadri Sahraoui" <[EMAIL PROTECTED]> wrote:
> > > > > I'd the same problem last week check if pdo_mysql is installed or no !
>
> > > > > On Jan 11, 2008 8:06 PM, Jonathan Wage <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hmm, I don't see any problems initially. But, currently their is a
> > > > > > bug in
> > > > > > the creation of databases and the connection name must be the same
> > > > > > as the
> > > > > > name of the database. But this is not related to your problem.
>
> > > > > > What kind of server are you running this on? Does it have PDO
> > > > > > mysql and all
> > > > > > that installed?
>
> > > > > > - Jon
>
> > > > > > On Jan 11, 2008 10:57 AM, Jonotron <[EMAIL PROTECTED] > wrote:
>
> > > > > > > my databases.yml file:
>
> > > > > > > dev:
> > > > > > > myproject:
> > > > > > > class: sfDoctrineDatabase
> > > > > > > param:
> > > > > > > dsn: mysql://dev:[EMAIL PROTECTED]/myProject_trunk
>
> > > > > > > and mydoctrine/schema.yml:
> > > > > > > ---
> > > > > > > # Sympathy project main schema file fordoctrine
> > > > > > > Person:
> > > > > > > columns:
> > > > > > > person_id:
> > > > > > > notnull: true
> > > > > > > primary: true
> > > > > > > autoincrement: true
> > > > > > > type: integer(4)
> > > > > > > unsigned: true
> > > > > > > name:
> > > > > > > notnull: true
> > > > > > > type: string
> > > > > > > length: 255
> > > > > > > content:
> > > > > > > type: clob
>
> > > > > > > Thanks again
>
> > > > > > > J
>
> > > > > > > On Jan 11, 6:41 am, "Jonathan Wage" < [EMAIL PROTECTED]> wrote:
> > > > > > > > Can we see your schema? Have you configured your databases.yml?
> > > > > > > > Can I
> > > > > > see
> > > > > > > > that too?
>
> > > > > > > > - Jon
>
> > > > > > > > On Jan 10, 2008 11:47 PM, Jonotron < [EMAIL PROTECTED]> wrote:
>
> > > > > > > > > I'm starting a new project and thought I'd giveDoctrinea try
> > > > > > > > > (having
> > > > > > > > > built one project on Propel, I like the looks
> > > > > > > > > ofDoctrinebetter).
>
> > > > > > > > > I've installed the sfDoctrinePlugin 1.0 branch from svn and
> > > > > > > > > the
> > > > > > > > >doctrine-build-model works fine, but when I try to
> > > > > > > > >dodoctrine-build-
> > > > > > > > > sql ordoctrine-insert-sql I get an exception. This is the
> > > > > > > > > only info
> > > > > > > > > I am presented:
>
> > > > > > > > > [sfException]
>
> > > > > > > > > #0
> > > > > > > > > /home/jonotron/workspace/myProject-trunk/plugins/sfDoctrinePlugin/
> > > > > > > > > lib/doctrine/Doctrine/Cli.php(88): Doctrine_Cli->_run(Array)
> > > > > > > > > #1
> > > > > > > > > /home/jonotron/workspace/myProject-trunk/plugins/sfDoctrinePlugin/
> > > > > > > > > data/tasks/sfPakeDoctrine.php(716): Doctrine_Cli->run(Array)
> > > > > > > > > #2
> > > > > > > > > /home/jonotron/workspace/myProject-trunk/plugins/sfDoctrinePlugin/
> > > > > > > > > data/tasks/sfPakeDoctrine.php(220):
> > > > > > > > > _call_doctrine_cli('generate-sql')
> > > > > > > > > #3 [internal function]:
> > > > > > > > > run_doctrine_build_sql(Object(pakeTask),
> > > > > > > > > Array, Array)
> > > > > > > > > #4
> > > > > > > > > /usr/share/php/symfony/vendor/pake/pakeTask.class.php(218):
> > > > > > > > > call_user_func_array('run_doctrine_bu...', Array)
> > > > > > > > > #5
> > > > > > > > > /usr/share/php/symfony/vendor/pake/pakeTask.class.php(181):
> > > > > > > > > pakeTask->execute(Array, Array)
> > > > > > > > > #6 /usr/share/php/symfony/vendor/pake/pakeApp.class.php(175):
> > > > > > > > > pakeTask->invoke(Array, Array)
> > > > > > > > > #7 /usr/share/php/data/symfony/bin/symfony.php(174): pakeApp-
> > > > > > > > > >run(NULL, NULL, false)
> > > > > > > > > #8 /usr/bin/symfony(39): include('/usr/share/
> > > > > > > > > php/...')
> > > > > > > > > #9 {main}
>
> > > > > > > > > Can anyone shed some light on this so I can get a little
> > > > > > > > > further and
> > > > > > > > > actually tryDoctrine?
>
> > > > > > > > > Thanks
>
> > > > > > > > --
> > > > > > > > Jonathan Wagehttp://www.jwage.comhttp://www.centresource.com
>
> > > > > > >http://www.centresource.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---