views:

41

answers:

2

A month ago I adjusted my database schema. I added a column called ordinal.

I rebuilt my model and uploaded my changes.

Everything works fine apart from my instance of sfLucene will not rebuild.

I run

symfony lucene-rebuild frontend

But I get the error once it gets to the Model in question (others are fine):

propel exception: unknown column ORDINAL

I have tried clearing the Symfony cache but to no avail.

I feel like Lucene has cached the database schema somewhere not sure where.

Index rebuilding works fine on my local PC.

A: 

Probably checks schema.yml or schema.xml

You can regenerate/update it with the console command

symfony propel:build-schema

Older versions of symfony use this syntax

symfony propel-build-schema
Peter Bailey
Thanks Peter, I have tried rebuilding my model and it has not helped the situation.
Jon Winstanley
A: 

Problem solved

The databases.yml file on the server had the all: setting pointed to my test server.

Unfortunately, the test server is on the same box, therefore MySQL login was succeeding.

However the test database did not have the recently added fields.

The command line (i.e. the symfony lucene-rebuild command) uses the all: setting in the databases.yml

Jon Winstanley
Nice big tick for you ;)
Raise
Ha ha - sorry @Raise! It was most definitely all down to you!
Jon Winstanley