Error in build-schema

Installation and environment issues, mainly on 1.x but there's some 2.x here too.

Moderators: dwhittle, Ian

Error in build-schema

Postby pmazumder » Sat Nov 13, 2010 2:42 pm

I have a database created in mysql. All the primary keys of the tables have a naming convetion <TableName>+ID i.e the primary key of the table tblPerson is PersonID. When I try to create the schema.yml by running php symfony doctrine:build-schema it shows error "Missing Class Name". The databases.yml file is properly configured. Can anybody please help?
pmazumder
Junior Member
 
Posts: 5
Joined: Fri Nov 12, 2010 7:53 am

Re: Error in build-schema

Postby halfer » Mon Nov 15, 2010 2:04 pm

Hmm, not heard of that one before. Would you put the entire output of this command here, in [code] tags, in case there is some more detail that might help?

Also, please supply your databases.yml file, in [code] tags. There may be a problem with it.
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK

Re: Error in build-schema

Postby pmazumder » Tue Nov 16, 2010 7:30 am

Dear halfer

php symfony doctrine:build-scheme shows the following:

>>doctrine generating yaml schema from database

Missing class name.


Content of the databases.yml :

all:
doctrine:
class: sfDoctrineDatabase
param:
dsn: 'mysql:host=localhost;dbname=CHCISDB'
username: root
password: null

Hope you can help

P.S: The indetions are not properly shown in the view page of the posting but they are properly given in the database.yml file
Thanks
pmazumder
Junior Member
 
Posts: 5
Joined: Fri Nov 12, 2010 7:53 am

Re: Error in build-schema

Postby touch_the_sky » Tue Nov 16, 2010 3:10 pm

I can't give you the answer, but maybe it would guide you in the right direction.

I had some issues with build-schema some time ago, with symfony 1.0 + propel + mysql db (task was to build admin app in sf for a non sf project). All I remember is that, all the problems were resolved by using Yog (db tool, you can get community edition for free - not sure if this version has all you need) to make some db changes (indexes / relations most likely, but as I say I don't remember;( ).
User avatar
touch_the_sky
Member
 
Posts: 93
Joined: Tue Jun 16, 2009 4:13 pm

Re: Error in build-schema

Postby halfer » Wed Nov 17, 2010 11:49 am

@pmazumder. D'oh! I mentioned using [code] tags twice in my post, and you still didn't use them! Please always use [code] tags to preserve indentation when asking questions.

Has a search engine search come up with anything?
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK

Re: Error in build-schema

Postby pmazumder » Sat Nov 20, 2010 8:37 am

@ Halfer

Sorry, I did not use [Code] tags. I will definitely do that next time.
The good news is, the problem is solved. After a close scrutiny in the database, I found that a related table was not created in the db. The person who created the db used "create temporary table...." in the sql. After creating the table the problem got fixed.

Thanks for all your help.

Pratik Mazumder
pmazumder
Junior Member
 
Posts: 5
Joined: Fri Nov 12, 2010 7:53 am


Return to Installation and setup

Who is online

Users browsing this forum: No registered users and 0 guests