PDOException Object
(
    [message:protected] => SQLSTATE[HY000]: General error: 1005 Can't create table 'teamaudio_prod.magenteamfma_advanceforum' (errno: 150)
    [string:Exception:private] => 
    [code:protected] => HY000
    [file:protected] => /var/www/clients/client1/web1/web/lib/Varien/Db/Adapter/Pdo/Mysql.php
    [line:protected] => 277
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /var/www/clients/client1/web1/web/lib/Varien/Db/Adapter/Pdo/Mysql.php
                    [line] => 277
                    [function] => query
                    [class] => PDO
                    [type] => ->
                    [args] => Array
                        (
                            [0] => CREATE TABLE `magenteamfma_advanceforum` (
      `forum_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `forum_title` varchar(150) NOT NULL,
      `forum_identifier` varchar(100) DEFAULT NULL,
      `forum_icon` varchar(100) DEFAULT NULL,
      `forum_description` varchar(500) DEFAULT NULL,
      `forum_status` smallint(2) DEFAULT '1',
      `parent_forum_id` int(10) unsigned DEFAULT NULL,
      `creation_date` datetime DEFAULT NULL,
      `last_update_date` datetime DEFAULT NULL,
      `views_count` bigint(20) unsigned DEFAULT NULL,
      `user_id` int(10) unsigned DEFAULT NULL,
      `meta_title` varchar(100) DEFAULT NULL,
      `meta_keywords` text,
      `meta_description` text,
      PRIMARY KEY (`forum_id`),
      KEY `FK_forum` (`user_id`),
      KEY `FK_fma_forum` (`parent_forum_id`),
     CONSTRAINT `FK_forum` FOREIGN KEY (`user_id`) REFERENCES `magenteamadmin_user` (`user_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
    ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC
                        )

                )

            [1] => Array
                (
                    [file] => /var/www/clients/client1/web1/web/lib/Varien/Db/Adapter/Pdo/Mysql.php
                    [line] => 401
                    [function] => raw_query
                    [class] => Varien_Db_Adapter_Pdo_Mysql
                    [type] => ->
                    [args] => Array
                        (
                            [0] => CREATE TABLE `magenteamfma_advanceforum` (
      `forum_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `forum_title` varchar(150) NOT NULL,
      `forum_identifier` varchar(100) DEFAULT NULL,
      `forum_icon` varchar(100) DEFAULT NULL,
      `forum_description` varchar(500) DEFAULT NULL,
      `forum_status` smallint(2) DEFAULT '1',
      `parent_forum_id` int(10) unsigned DEFAULT NULL,
      `creation_date` datetime DEFAULT NULL,
      `last_update_date` datetime DEFAULT NULL,
      `views_count` bigint(20) unsigned DEFAULT NULL,
      `user_id` int(10) unsigned DEFAULT NULL,
      `meta_title` varchar(100) DEFAULT NULL,
      `meta_keywords` text,
      `meta_description` text,
      PRIMARY KEY (`forum_id`),
      KEY `FK_forum` (`user_id`),
      KEY `FK_fma_forum` (`parent_forum_id`),
     CONSTRAINT `FK_forum` FOREIGN KEY (`user_id`) REFERENCES `magenteamadmin_user` (`user_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
    ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC
                        )

                )

            [2] => Array
                (
                    [file] => /var/www/clients/client1/web1/web/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 636
                    [function] => multi_query
                    [class] => Varien_Db_Adapter_Pdo_Mysql
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 

    DROP TABLE IF EXISTS `magenteamfma_advanceforum`;

    CREATE TABLE `magenteamfma_advanceforum` (
      `forum_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `forum_title` varchar(150) NOT NULL,
      `forum_identifier` varchar(100) DEFAULT NULL,
      `forum_icon` varchar(100) DEFAULT NULL,
      `forum_description` varchar(500) DEFAULT NULL,
      `forum_status` smallint(2) DEFAULT '1',
      `parent_forum_id` int(10) unsigned DEFAULT NULL,
      `creation_date` datetime DEFAULT NULL,
      `last_update_date` datetime DEFAULT NULL,
      `views_count` bigint(20) unsigned DEFAULT NULL,
      `user_id` int(10) unsigned DEFAULT NULL,
      `meta_title` varchar(100) DEFAULT NULL,
      `meta_keywords` text,
      `meta_description` text,
      PRIMARY KEY (`forum_id`),
      KEY `FK_forum` (`user_id`),
      KEY `FK_fma_forum` (`parent_forum_id`),
     CONSTRAINT `FK_forum` FOREIGN KEY (`user_id`) REFERENCES `magenteamadmin_user` (`user_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
    ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

    /*Data for the table `fma_forum` */




    /*Table structure for table `fma_forum_store` */

    DROP TABLE IF EXISTS `magenteamfma_forum_store`;

    CREATE TABLE `magenteamfma_forum_store` (
      `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `store_id` int(10) unsigned NOT NULL,
      `forum_id` int(10) unsigned NOT NULL,
      PRIMARY KEY (`id`),
      KEY `FK_fma_forum_store` (`forum_id`),
      CONSTRAINT `FK_fma_forum_store` FOREIGN KEY (`forum_id`) REFERENCES `magenteamfma_advanceforum` (`forum_id`) ON DELETE CASCADE ON UPDATE CASCADE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

    /*Data for the table `fma_forum_store` */


    /*Table structure for table `fma_forum_access` */

    DROP TABLE IF EXISTS `magenteamfma_access`;

    CREATE TABLE `magenteamfma_access` (
        `topic_id` int(10) unsigned NOT NULL,
      `user_id` int(10) unsigned NOT NULL,
      `creation_date` datetime DEFAULT NULL,
      `last_update_date` datetime DEFAULT NULL,
      PRIMARY KEY (`topic_id`,`user_id`),
      KEY `FK_fma_forum_access` (`user_id`),
      CONSTRAINT `FK_fma_access` FOREIGN KEY (`topic_id`) REFERENCES `magenteamfma_topic` (`topic_id`) ON DELETE CASCADE ON UPDATE CASCADE,
      CONSTRAINT `FK_fma_forum_access` FOREIGN KEY (`user_id`) REFERENCES `magenteamcustomer_entity` (`entity_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

    /*Data for the table `fma_forum_access` */


    /*Table structure for table `fma_forum_topic` */

    DROP TABLE IF EXISTS `magenteamfma_topic`;

    CREATE TABLE `magenteamfma_topic` (
      `topic_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `forum_id` int(10) unsigned DEFAULT NULL,
      `topic_icon` varchar(100) DEFAULT NULL,
      `topic_identifier` varchar(100) DEFAULT NULL,
      `topic_title` varchar(150) DEFAULT NULL,
      `topic_description` varchar(500) DEFAULT NULL,
      `parent_topic_id` int(10) unsigned DEFAULT NULL,
      `views_count` bigint(20) unsigned DEFAULT NULL,
      `report_count` int(10) unsigned DEFAULT NULL,
      `creation_date` datetime DEFAULT NULL,
      `last_update_date` datetime DEFAULT NULL,
      `user_id` int(10) unsigned DEFAULT NULL,
      `admin_user_id` int(10) unsigned DEFAULT NULL,
      `user_ip` varchar(46) DEFAULT NULL,
      `topic_status` smallint(2) DEFAULT '1',
      `topic_moderater_id` int(10) unsigned DEFAULT NULL,
      `meta_title` varchar(100) DEFAULT NULL,
      `meta_keywords` text,
      `meta_description` text,
      PRIMARY KEY (`topic_id`),
      KEY `FK_forum_topic` (`forum_id`),
      KEY `FK_forum_parent_topic` (`parent_topic_id`),
      KEY `FK_forum_topic_moderater` (`topic_moderater_id`),
      KEY `FK_fma_forum_topic_admin_user_id` (`admin_user_id`),
      KEY `FK_fma_forum_topic` (`user_id`),
      CONSTRAINT `FK_fma_forum_topic` FOREIGN KEY (`user_id`) REFERENCES `magenteamcustomer_entity` (`entity_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
      CONSTRAINT `FK_fma_forum_topic_admin_user_id` FOREIGN KEY (`admin_user_id`) REFERENCES `magenteamadmin_user` (`user_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
      CONSTRAINT `FK_topic_forum` FOREIGN KEY (`forum_id`) REFERENCES `magenteamfma_advanceforum` (`forum_id`) ON DELETE CASCADE ON UPDATE CASCADE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

    /*Data for the table `fma_forum_topic` */


    /*Table structure for table `fma_forum_post` */

    DROP TABLE IF EXISTS `magenteamfma_post`;

    CREATE TABLE `magenteamfma_post` (

      `post_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `topic_id` int(10) unsigned DEFAULT NULL,
      `user_id` int(10) unsigned DEFAULT NULL,
      `admin_user_id` int(10) unsigned DEFAULT NULL,
      `user_ip` varchar(20) DEFAULT NULL,
      `creation_date` datetime DEFAULT NULL,
      `last_update_date` datetime DEFAULT NULL,
      `post_title` varchar(200) DEFAULT NULL,
      `post_text` text,
      `post_image` varchar(100) DEFAULT NULL,
      `signature_status` smallint(2) DEFAULT '1',
      `report_count` int(10) DEFAULT NULL,
      `post_status` smallint(2) DEFAULT '1',
      `quoted_post_id` bigint(20) unsigned DEFAULT NULL,
      `approved_status` smallint(2) DEFAULT '0',
      `totallikes` int(10) DEFAULT '0',
      `likedby` text,
      `reportedby` text,
      PRIMARY KEY (`post_id`),
      KEY `FK_forum_post_topic` (`topic_id`),
      KEY `FK_forum_post_parent` (`quoted_post_id`),
      KEY `FK_fma_forum_post_admin_user` (`admin_user_id`),
      KEY `FK_fma_forum_post` (`user_id`),
      CONSTRAINT `FK_fma_forum_post` FOREIGN KEY (`user_id`) REFERENCES `magenteamcustomer_entity` (`entity_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
      CONSTRAINT `FK_fma_forum_post_admin_user` FOREIGN KEY (`admin_user_id`) REFERENCES `magenteamadmin_user` (`user_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
      CONSTRAINT `FK_post_topic` FOREIGN KEY (`topic_id`) REFERENCES `magenteamfma_topic` (`topic_id`) ON DELETE CASCADE ON UPDATE CASCADE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

    /*Data for the table `fma_forum_post` */


    /*Table structure for table `fma_forum_private_msg` */

    DROP TABLE IF EXISTS `magenteamfma_private_msg`;

    CREATE TABLE `magenteamfma_private_msg` (
      `msg_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `sender_user_id` int(10) unsigned DEFAULT NULL,
      `receiver_user_id` int(10) unsigned DEFAULT NULL,
      `msg_title` varchar(200) DEFAULT NULL,
      `msg_text` text,
      `msg_new` smallint(2) DEFAULT NULL,
      `msg_read_status` smallint(2) DEFAULT NULL,
      `creation_date` datetime DEFAULT NULL,
      `last_update_date` datetime DEFAULT NULL,
      `msg_trash_status` smallint(2) DEFAULT NULL,
      PRIMARY KEY (`msg_id`),
      KEY `FK_fma_forum_private_msg_sen` (`sender_user_id`),
      KEY `FK_fma_forum_private_msg` (`receiver_user_id`),
      CONSTRAINT `FK_fma_forum_rec_id` FOREIGN KEY (`receiver_user_id`) REFERENCES `magenteamcustomer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
      CONSTRAINT `FK_fma_forum_sen_id` FOREIGN KEY (`sender_user_id`) REFERENCES `magenteamcustomer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

    /*Data for the table `fma_forum_private_msg` */


    /*Table structure for table `fma_forum_rank` */

    DROP TABLE IF EXISTS `magenteamfma_rank`;

    CREATE TABLE `magenteamfma_rank` (
      `rank_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `rank_title` varchar(100) NOT NULL,
      `rank_image` varchar(100) DEFAULT NULL,
      `creation_date` datetime DEFAULT NULL,
      `last_update_date` datetime DEFAULT NULL,
      PRIMARY KEY (`rank_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

    /*Data for the table `fma_forum_rank` */


    /*Table structure for table `fma_forum_topic_product` */

    DROP TABLE IF EXISTS `magenteamfma_product_topic`;

    CREATE TABLE `magenteamfma_product_topic` (
      `topic_id` int(10) unsigned NOT NULL,
      `product_id` int(10) unsigned NOT NULL,
      `creation_date` datetime DEFAULT NULL,
      `last_update_date` datetime DEFAULT NULL,
      PRIMARY KEY (`topic_id`,`product_id`),
      KEY `FK_fma_forum_topic_product_pro` (`product_id`),
      CONSTRAINT `FK_fma_forum_topic_product` FOREIGN KEY (`topic_id`) REFERENCES `magenteamfma_topic` (`topic_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
      CONSTRAINT `FK_fma_forum_topic_product_pro` FOREIGN KEY (`product_id`) REFERENCES `magenteamcatalog_product_entity` (`entity_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

    /*Data for the table `fma_forum_topic_product` */


    /*Table structure for table `fma_forum_user` */

    DROP TABLE IF EXISTS `magenteamfma_user`;

    CREATE TABLE `magenteamfma_user` (
      `user_id` int(10) unsigned NOT NULL,
      `user_rank` int(10) unsigned DEFAULT NULL,
      `nick_name` varchar(20) DEFAULT NULL,
      `profile_pic` varchar(100) DEFAULT NULL,
      `signature` varchar(200) DEFAULT NULL,
      PRIMARY KEY (`user_id`),
      KEY `FK_forum_user_rank` (`user_rank`),
      CONSTRAINT `FK_fma_forum_user` FOREIGN KEY (`user_id`) REFERENCES `magenteamcustomer_entity` (`entity_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
      CONSTRAINT `FK_forum_user_rank` FOREIGN KEY (`user_rank`) REFERENCES `magenteamfma_rank` (`rank_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

    /*Data for the table `fma_forum_user` */

    /*Table structure for table `fma_forums_bookmark` */

    DROP TABLE IF EXISTS `magenteamfma_bookmark`;

    CREATE TABLE `magenteamfma_bookmark` (
      `bookmark_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `bookmarked_topic_id` int(10) unsigned DEFAULT NULL,
      `creation_date` datetime DEFAULT NULL,
      `last_update_date` datetime DEFAULT NULL,
      `user_id` int(10) unsigned DEFAULT NULL,
      PRIMARY KEY (`bookmark_id`),
      KEY `FK_fma_forums_bookmark` (`bookmarked_topic_id`),
      KEY `FK_fma_forums_bookmark_user` (`user_id`),
      CONSTRAINT `FK_fma_forums_bookmark` FOREIGN KEY (`bookmarked_topic_id`) REFERENCES `magenteamfma_topic` (`topic_id`) ON DELETE CASCADE ON UPDATE CASCADE,
      CONSTRAINT `FK_fma_forums_bookmark_user` FOREIGN KEY (`user_id`) REFERENCES `magenteamfma_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

  
                        )

                )

            [3] => Array
                (
                    [file] => /var/www/clients/client1/web1/web/app/code/local/FMA/Advanceforum/sql/advanceforum_setup/mysql4-install-0.1.0.php
                    [line] => 240
                    [function] => run
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 

    DROP TABLE IF EXISTS `magenteamfma_advanceforum`;

    CREATE TABLE `magenteamfma_advanceforum` (
      `forum_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `forum_title` varchar(150) NOT NULL,
      `forum_identifier` varchar(100) DEFAULT NULL,
      `forum_icon` varchar(100) DEFAULT NULL,
      `forum_description` varchar(500) DEFAULT NULL,
      `forum_status` smallint(2) DEFAULT '1',
      `parent_forum_id` int(10) unsigned DEFAULT NULL,
      `creation_date` datetime DEFAULT NULL,
      `last_update_date` datetime DEFAULT NULL,
      `views_count` bigint(20) unsigned DEFAULT NULL,
      `user_id` int(10) unsigned DEFAULT NULL,
      `meta_title` varchar(100) DEFAULT NULL,
      `meta_keywords` text,
      `meta_description` text,
      PRIMARY KEY (`forum_id`),
      KEY `FK_forum` (`user_id`),
      KEY `FK_fma_forum` (`parent_forum_id`),
     CONSTRAINT `FK_forum` FOREIGN KEY (`user_id`) REFERENCES `magenteamadmin_user` (`user_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
    ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

    /*Data for the table `fma_forum` */




    /*Table structure for table `fma_forum_store` */

    DROP TABLE IF EXISTS `magenteamfma_forum_store`;

    CREATE TABLE `magenteamfma_forum_store` (
      `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `store_id` int(10) unsigned NOT NULL,
      `forum_id` int(10) unsigned NOT NULL,
      PRIMARY KEY (`id`),
      KEY `FK_fma_forum_store` (`forum_id`),
      CONSTRAINT `FK_fma_forum_store` FOREIGN KEY (`forum_id`) REFERENCES `magenteamfma_advanceforum` (`forum_id`) ON DELETE CASCADE ON UPDATE CASCADE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

    /*Data for the table `fma_forum_store` */


    /*Table structure for table `fma_forum_access` */

    DROP TABLE IF EXISTS `magenteamfma_access`;

    CREATE TABLE `magenteamfma_access` (
        `topic_id` int(10) unsigned NOT NULL,
      `user_id` int(10) unsigned NOT NULL,
      `creation_date` datetime DEFAULT NULL,
      `last_update_date` datetime DEFAULT NULL,
      PRIMARY KEY (`topic_id`,`user_id`),
      KEY `FK_fma_forum_access` (`user_id`),
      CONSTRAINT `FK_fma_access` FOREIGN KEY (`topic_id`) REFERENCES `magenteamfma_topic` (`topic_id`) ON DELETE CASCADE ON UPDATE CASCADE,
      CONSTRAINT `FK_fma_forum_access` FOREIGN KEY (`user_id`) REFERENCES `magenteamcustomer_entity` (`entity_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

    /*Data for the table `fma_forum_access` */


    /*Table structure for table `fma_forum_topic` */

    DROP TABLE IF EXISTS `magenteamfma_topic`;

    CREATE TABLE `magenteamfma_topic` (
      `topic_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `forum_id` int(10) unsigned DEFAULT NULL,
      `topic_icon` varchar(100) DEFAULT NULL,
      `topic_identifier` varchar(100) DEFAULT NULL,
      `topic_title` varchar(150) DEFAULT NULL,
      `topic_description` varchar(500) DEFAULT NULL,
      `parent_topic_id` int(10) unsigned DEFAULT NULL,
      `views_count` bigint(20) unsigned DEFAULT NULL,
      `report_count` int(10) unsigned DEFAULT NULL,
      `creation_date` datetime DEFAULT NULL,
      `last_update_date` datetime DEFAULT NULL,
      `user_id` int(10) unsigned DEFAULT NULL,
      `admin_user_id` int(10) unsigned DEFAULT NULL,
      `user_ip` varchar(46) DEFAULT NULL,
      `topic_status` smallint(2) DEFAULT '1',
      `topic_moderater_id` int(10) unsigned DEFAULT NULL,
      `meta_title` varchar(100) DEFAULT NULL,
      `meta_keywords` text,
      `meta_description` text,
      PRIMARY KEY (`topic_id`),
      KEY `FK_forum_topic` (`forum_id`),
      KEY `FK_forum_parent_topic` (`parent_topic_id`),
      KEY `FK_forum_topic_moderater` (`topic_moderater_id`),
      KEY `FK_fma_forum_topic_admin_user_id` (`admin_user_id`),
      KEY `FK_fma_forum_topic` (`user_id`),
      CONSTRAINT `FK_fma_forum_topic` FOREIGN KEY (`user_id`) REFERENCES `magenteamcustomer_entity` (`entity_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
      CONSTRAINT `FK_fma_forum_topic_admin_user_id` FOREIGN KEY (`admin_user_id`) REFERENCES `magenteamadmin_user` (`user_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
      CONSTRAINT `FK_topic_forum` FOREIGN KEY (`forum_id`) REFERENCES `magenteamfma_advanceforum` (`forum_id`) ON DELETE CASCADE ON UPDATE CASCADE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

    /*Data for the table `fma_forum_topic` */


    /*Table structure for table `fma_forum_post` */

    DROP TABLE IF EXISTS `magenteamfma_post`;

    CREATE TABLE `magenteamfma_post` (

      `post_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `topic_id` int(10) unsigned DEFAULT NULL,
      `user_id` int(10) unsigned DEFAULT NULL,
      `admin_user_id` int(10) unsigned DEFAULT NULL,
      `user_ip` varchar(20) DEFAULT NULL,
      `creation_date` datetime DEFAULT NULL,
      `last_update_date` datetime DEFAULT NULL,
      `post_title` varchar(200) DEFAULT NULL,
      `post_text` text,
      `post_image` varchar(100) DEFAULT NULL,
      `signature_status` smallint(2) DEFAULT '1',
      `report_count` int(10) DEFAULT NULL,
      `post_status` smallint(2) DEFAULT '1',
      `quoted_post_id` bigint(20) unsigned DEFAULT NULL,
      `approved_status` smallint(2) DEFAULT '0',
      `totallikes` int(10) DEFAULT '0',
      `likedby` text,
      `reportedby` text,
      PRIMARY KEY (`post_id`),
      KEY `FK_forum_post_topic` (`topic_id`),
      KEY `FK_forum_post_parent` (`quoted_post_id`),
      KEY `FK_fma_forum_post_admin_user` (`admin_user_id`),
      KEY `FK_fma_forum_post` (`user_id`),
      CONSTRAINT `FK_fma_forum_post` FOREIGN KEY (`user_id`) REFERENCES `magenteamcustomer_entity` (`entity_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
      CONSTRAINT `FK_fma_forum_post_admin_user` FOREIGN KEY (`admin_user_id`) REFERENCES `magenteamadmin_user` (`user_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
      CONSTRAINT `FK_post_topic` FOREIGN KEY (`topic_id`) REFERENCES `magenteamfma_topic` (`topic_id`) ON DELETE CASCADE ON UPDATE CASCADE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

    /*Data for the table `fma_forum_post` */


    /*Table structure for table `fma_forum_private_msg` */

    DROP TABLE IF EXISTS `magenteamfma_private_msg`;

    CREATE TABLE `magenteamfma_private_msg` (
      `msg_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `sender_user_id` int(10) unsigned DEFAULT NULL,
      `receiver_user_id` int(10) unsigned DEFAULT NULL,
      `msg_title` varchar(200) DEFAULT NULL,
      `msg_text` text,
      `msg_new` smallint(2) DEFAULT NULL,
      `msg_read_status` smallint(2) DEFAULT NULL,
      `creation_date` datetime DEFAULT NULL,
      `last_update_date` datetime DEFAULT NULL,
      `msg_trash_status` smallint(2) DEFAULT NULL,
      PRIMARY KEY (`msg_id`),
      KEY `FK_fma_forum_private_msg_sen` (`sender_user_id`),
      KEY `FK_fma_forum_private_msg` (`receiver_user_id`),
      CONSTRAINT `FK_fma_forum_rec_id` FOREIGN KEY (`receiver_user_id`) REFERENCES `magenteamcustomer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
      CONSTRAINT `FK_fma_forum_sen_id` FOREIGN KEY (`sender_user_id`) REFERENCES `magenteamcustomer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

    /*Data for the table `fma_forum_private_msg` */


    /*Table structure for table `fma_forum_rank` */

    DROP TABLE IF EXISTS `magenteamfma_rank`;

    CREATE TABLE `magenteamfma_rank` (
      `rank_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `rank_title` varchar(100) NOT NULL,
      `rank_image` varchar(100) DEFAULT NULL,
      `creation_date` datetime DEFAULT NULL,
      `last_update_date` datetime DEFAULT NULL,
      PRIMARY KEY (`rank_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

    /*Data for the table `fma_forum_rank` */


    /*Table structure for table `fma_forum_topic_product` */

    DROP TABLE IF EXISTS `magenteamfma_product_topic`;

    CREATE TABLE `magenteamfma_product_topic` (
      `topic_id` int(10) unsigned NOT NULL,
      `product_id` int(10) unsigned NOT NULL,
      `creation_date` datetime DEFAULT NULL,
      `last_update_date` datetime DEFAULT NULL,
      PRIMARY KEY (`topic_id`,`product_id`),
      KEY `FK_fma_forum_topic_product_pro` (`product_id`),
      CONSTRAINT `FK_fma_forum_topic_product` FOREIGN KEY (`topic_id`) REFERENCES `magenteamfma_topic` (`topic_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
      CONSTRAINT `FK_fma_forum_topic_product_pro` FOREIGN KEY (`product_id`) REFERENCES `magenteamcatalog_product_entity` (`entity_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

    /*Data for the table `fma_forum_topic_product` */


    /*Table structure for table `fma_forum_user` */

    DROP TABLE IF EXISTS `magenteamfma_user`;

    CREATE TABLE `magenteamfma_user` (
      `user_id` int(10) unsigned NOT NULL,
      `user_rank` int(10) unsigned DEFAULT NULL,
      `nick_name` varchar(20) DEFAULT NULL,
      `profile_pic` varchar(100) DEFAULT NULL,
      `signature` varchar(200) DEFAULT NULL,
      PRIMARY KEY (`user_id`),
      KEY `FK_forum_user_rank` (`user_rank`),
      CONSTRAINT `FK_fma_forum_user` FOREIGN KEY (`user_id`) REFERENCES `magenteamcustomer_entity` (`entity_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
      CONSTRAINT `FK_forum_user_rank` FOREIGN KEY (`user_rank`) REFERENCES `magenteamfma_rank` (`rank_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

    /*Data for the table `fma_forum_user` */

    /*Table structure for table `fma_forums_bookmark` */

    DROP TABLE IF EXISTS `magenteamfma_bookmark`;

    CREATE TABLE `magenteamfma_bookmark` (
      `bookmark_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `bookmarked_topic_id` int(10) unsigned DEFAULT NULL,
      `creation_date` datetime DEFAULT NULL,
      `last_update_date` datetime DEFAULT NULL,
      `user_id` int(10) unsigned DEFAULT NULL,
      PRIMARY KEY (`bookmark_id`),
      KEY `FK_fma_forums_bookmark` (`bookmarked_topic_id`),
      KEY `FK_fma_forums_bookmark_user` (`user_id`),
      CONSTRAINT `FK_fma_forums_bookmark` FOREIGN KEY (`bookmarked_topic_id`) REFERENCES `magenteamfma_topic` (`topic_id`) ON DELETE CASCADE ON UPDATE CASCADE,
      CONSTRAINT `FK_fma_forums_bookmark_user` FOREIGN KEY (`user_id`) REFERENCES `magenteamfma_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

  
                        )

                )

            [4] => Array
                (
                    [file] => /var/www/clients/client1/web1/web/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 376
                    [args] => Array
                        (
                            [0] => /var/www/clients/client1/web1/web/app/code/local/FMA/Advanceforum/sql/advanceforum_setup/mysql4-install-0.1.0.php
                        )

                    [function] => include
                )

            [5] => Array
                (
                    [file] => /var/www/clients/client1/web1/web/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 276
                    [function] => _modifyResourceDb
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ->
                    [args] => Array
                        (
                            [0] => install
                            [1] => 
                            [2] => 0.1.0
                        )

                )

            [6] => Array
                (
                    [file] => /var/www/clients/client1/web1/web/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 240
                    [function] => _installResourceDb
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 0.1.0
                        )

                )

            [7] => Array
                (
                    [file] => /var/www/clients/client1/web1/web/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 161
                    [function] => applyUpdates
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

            [8] => Array
                (
                    [file] => /var/www/clients/client1/web1/web/app/code/core/Mage/Core/Model/App.php
                    [line] => 399
                    [function] => applyAllUpdates
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ::
                    [args] => Array
                        (
                        )

                )

            [9] => Array
                (
                    [file] => /var/www/clients/client1/web1/web/app/code/core/Mage/Core/Model/App.php
                    [line] => 329
                    [function] => _initModules
                    [class] => Mage_Core_Model_App
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

            [10] => Array
                (
                    [file] => /var/www/clients/client1/web1/web/app/Mage.php
                    [line] => 627
                    [function] => run
                    [class] => Mage_Core_Model_App
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [scope_code] => v2
                                    [scope_type] => store
                                    [options] => Array
                                        (
                                        )

                                )

                        )

                )

            [11] => Array
                (
                    [file] => /var/www/clients/client1/web1/web/index.php
                    [line] => 123
                    [function] => run
                    [class] => Mage
                    [type] => ::
                    [args] => Array
                        (
                            [0] => v2
                            [1] => store
                        )

                )

        )

    [previous:Exception:private] => 
    [errorInfo] => Array
        (
            [0] => HY000
            [1] => 1005
            [2] => Can't create table 'teamaudio_prod.magenteamfma_advanceforum' (errno: 150)
        )

)