Ah. Thanks for the hint.

I have models for all tables... BUT the schema generator does not find
them all since some are in plugins and some are in sub-foldes of app/
models. I guess tables matching these models are the cause of the
problem.

So in reality, schema shell is only fully usable in apps that do not
have plugins, multiple dbs or sub-folders inside models. Oh, and all
table must follow Cake's conventions to the letter. E.g. can't have a
table without a pk for example.

I kind of liked the idea of the schema shell. Being abel to keep just
one schema file and letting Git do the versioning feel just right next
to the rails-type schema files. So I guess I will have to start
plowing the source to see if I can make it behave with my schema after
a reasonable amount of work.

/Martin



On Mar 25, 2:07 pm, "Ian M. Jones" <[email protected]> wrote:
> Hi Martin,
>
> Have you got models defined for all the tables in your schema file?
>
> If not, running "cake schema run update" will try to add all the columns for 
> any tables missing model files, so I discovered myself today.
>
> Regards,
>
> Ian
> ________________________________________
> IMiJ 
> Ltdhttp://www.imij.co.ukhttp://www.ianmjones.comhttp://twitter.com/ianmjones
>
> On 25 Mar 2010, at 13:02, Martin Westin wrote:
>
>
>
> > I thought I'd give schema migrations a try. But something small must
> > be horribly wrong with how I am trying to use the schema shell.
>
> > I run "cake schema run update" on the database that just generated the
> > schema and the shell wants to add all the columns to the tables again.
> > That can't be right? What's wrong with my schema that the shell thinks
> > all tables are without columns?
>
> > I am on Cake 1.2.6 and Apache2, php5.3, MySQL 5... on a Mac with Snow
> > Leopard.
>
> > I tried creating an empty db. I ran a create and it created all
> > tables... then I ran update and it again wanted to add all (existing)
> > columns to the tables.
>
> > Any ideas?
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" 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 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> > To unsubscribe from this group, send email to 
> > cake-php+unsubscribegooglegroups.com or reply to this email with the words 
> > "REMOVE ME" as the subject.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to