> Hi,
>
> Sorry if this is answered somewhere, but I checked the archives as
> well as the bug tracker and didn't see anything.
>
> I've got an app built on 1.3.7. I generated an initial schema from
> database1 and have been able to use it to generate tables on
> database2.
>
> I subsequently added a new table to database1, and generated
> schema_2.php. The only difference is that the new table was added.
> When I run schema update -s 2 against database2, the console throws
> the following:
>
> Comparing Database to Schema...
> Error: Missing database table 'cm_foo_bar' for model 'FooBar'
>
> Looking through the code, it appears that cake_schema.php is calling
> ClassRegistry::init on each defined model, which eventually calls
> __construct in model/model.php, which calls $this->setSource($this-
>>useTable) which fails because there is no table 'cm_foo_bar' that
> matches the model 'FooBar' that is trying to be constructed. However,
> getting the table to exist is exactly the operation I'm trying to
> execute.
>
> Am I missing something here?
>
I assume you're using database configuration more than one and use
different prefix
on different configuration. Could you do schema update -s 2 -dry to
preview the changes?
--
regards,
Akeda Bagus
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment