SQL dump file for CakeDC comments plugin for CakePHP

If they (CakeDC people) don’t have complaint of any kind or whatsoever i would like to post the SQL dump code for comments table used in CakeDC comments plugin. Especially, those having problems with generating database table or query through cake console could find this sql dump useful. But, before using this dump, please try to compare it with the latest schema file that could be found in config/schema.php file of the plug-in, it is possible that they might have altered the structure of the table in the meantime (It is Nov 02, 2010 today), so please use it at your own risk.

I too tried to find the sql dump file with in plug-in files but could not. There is no mention of sql dump either at the CakeDC website page (http://cakedc.com/eng/downloads/view/cakephp_comments_plugin) or at project’s github page (http://github.com/CakeDC/Comments). I hope this gets proper mention in plug-in’s future documentation which still requires good amount of improvements. English used in documentation is poor (yeah, this time poor than mine;) ) along with some typo errors example of which could be seen in the very first line of the implementation guidelines as shown under:

public function beforeFiler() {
$this->passedArgs[‘comment_view_type’] = ‘flat’;

you can notice that beforeFilter() is typed as beforeFiler(). Okay (hopefully we will discuss it in more details later) here is the sql dump for comments table:

CREATE TABLE `comments` (
`id` varchar(36) NOT NULL,
`parent_id` varchar(36) DEFAULT NULL,
`foreign_key` varchar(36) NOT NULL,
`user_id` varchar(36) NOT NULL,
`lft` int(10) NOT NULL,
`rght` int(10) NOT NULL,
`model` varchar(255) NOT NULL,
`approved` tinyint(1) DEFAULT 1 NOT NULL,
`is_spam` varchar(20) DEFAULT ‘clean’ NOT NULL,
`title` varchar(255) DEFAULT NULL,
`slug` varchar(255) DEFAULT NULL,
`body` text DEFAULT NULL,
`author_name` varchar(255) DEFAULT NULL,
`author_url` varchar(255) DEFAULT NULL,
`author_email` varchar(128) DEFAULT ” NOT NULL,
`language` varchar(6) DEFAULT NULL,
`comment_type` varchar(32) DEFAULT ‘comment’ NOT NULL,
`created` datetime DEFAULT NULL,
`modified` datetime DEFAULT NULL, PRIMARY KEY (`id`)) ;

3 thoughts on “SQL dump file for CakeDC comments plugin for CakePHP

  1. This is exactly what I needed. Thanks. The quotes on this page won’t work via copy and paste though. I had to use:

    CREATE TABLE comments (
    id varchar(36) NOT NULL,
    parent_id varchar(36) DEFAULT NULL,
    foreign_key varchar(36) NOT NULL,
    user_id varchar(36) NOT NULL,
    lft int(10) NOT NULL,
    rght int(10) NOT NULL,
    model varchar(255) NOT NULL,
    approved tinyint(1) DEFAULT 1 NOT NULL,
    is_spam varchar(20) DEFAULT ‘clean’ NOT NULL,
    title varchar(255) DEFAULT NULL,
    slug varchar(255) DEFAULT NULL,
    body text DEFAULT NULL,
    author_name varchar(255) DEFAULT NULL,
    author_url varchar(255) DEFAULT NULL,
    author_email varchar(128) DEFAULT ” NOT NULL,
    language varchar(6) DEFAULT NULL,
    comment_type varchar(32) DEFAULT ‘comment’ NOT NULL,
    created datetime DEFAULT NULL,
    modified datetime DEFAULT NULL, PRIMARY KEY ( id )) ;

  2. Thank you for sharing your experience and help others.

    I would like to highlight the fact that the code is open source. It means that you can fork the Comments repository, improve the readme file to fix typos and improve it and finally send a pull request to CakeDC.

    I am sure any help would be appreciated ;)

Leave a Reply

Your email address will not be published. Required fields are marked *