Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can CakePHP automatically create tables from models?

In python::Pylons i'm able to issue a setup-app command and it will look at my Models and issue the appropriate CREATE TABLE or CREATE INDEX ddl for my particular database.

it seems like this would be a feature in CakePHP, but i'm having trouble finding it.

in fact i see this in the manual: "You can create your database tables as you normally would. When you create your Model classes, they'll automatically map to the tables that you've created."

which leads me to believe it doesn't exist?

like image 426
ggez44 Avatar asked Sep 21 '25 00:09

ggez44


1 Answers

No, it's other way around - you can create models, controllers and views by having DB schema. It's more logical to have a DB design schema first.

Check this out

like image 168
Nik Chankov Avatar answered Sep 23 '25 12:09

Nik Chankov