简体   繁体   中英

Automatic DB setup for CakePHP plugins

Let me disclaim first, that I'm a total CakePHP newbie. I am pretty proficient in PHP and MySQL however, having developed my own frameworks, etc., until I saw that other frameworks have already done the work for you :/ I'm trying to get into CakePHP cuz it has great documentation, good organization and the powerful console.

I've gone through the basics now and am trying to look into plugins - I have decided to start with the comments plugin, found at: http://cakedc.com/eng/downloads/view/cakephp_comments_plugin

I followed the first few lines of instructions to where I'm supposed to see the thing work, but it gave me errors about missing tables (eg Database table comments for model Comment was not found.). Certain I'll find a file, I've found this: /app/plugins/comments/config/schema/schema.php. The $comments array looks like it's formatted to be automated, instead of creating tables manually. But googling has failed to produce a good guide.

What line of instruction am I missing? Is there a way to use the console to convert this array (and other schema the plugin may require) into the DB scheme? Is there a script I should run every time I install a plugin?

Thanks in advance for your help.

You load the schema via the cake shell. More info here: h

http://book.cakephp.org/view/1524/Generating-and-using-Schema-files

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM