<?php
//カラムの修正、追加テーブルの一覧と、そのSQL
//実行はCREATEの前に行うこと。
$tablecolumnlist = array(
            array('action' => 'MODIFY COLUMN',
            'data' => array(
                'name' => "c_diary",
                'column' => "public_flag",
                'sql' => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_diary` MODIFY COLUMN `public_flag` enum('public','friend','private','open') NOT NULL default 'public';",
                        ),
             ),
            array('action' => 'MODIFY COLUMN',
            'data' => array(
                'name' => "c_member_secure",
                'column' => "pc_address_aes",
                'sql' => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_member_secure` MODIFY COLUMN `pc_address_aes` text NOT NULL DEFAULT '';",
                        ),
                    ),
            array('action' => 'MODIFY COLUMN',
            'data' => array(
                'name' => "c_member_secure",
                'column' => "ktai_address_aes",
                'sql' => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_member_secure` MODIFY COLUMN `ktai_address_aes` text NOT NULL DEFAULT '';",
                        ),
                    ),
            array('action' => 'MODIFY COLUMN',
            'data' => array(
                'name' => "c_member_secure",
                'column' => "regist_address_aes",
                'sql' => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_member_secure` MODIFY COLUMN `regist_address_aes` text NOT NULL DEFAULT '';",
                        ),
                    ),
            array('action' => 'MODIFY COLUMN',
            'data' => array(
                'name' => "c_member_secure",
                'column' => "easy_access_id_aes",
                'sql' => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_member_secure` MODIFY COLUMN `easy_access_id_aes` text NOT NULL DEFAULT '';",
                        ),
                    ),
            array('action' => 'MODIFY COLUMN',
            'data' => array(
                'name' => "c_member",
                'column' => "public_flag_diary",
                'sql' => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_member` MODIFY COLUMN `public_flag_diary` enum('open','public','friend','private') NOT NULL default 'public';",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_member",
                'column' => "mobile_view",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_member` ADD COLUMN `mobile_view` int(11) NOT NULL default '0'",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_member",
                'column' => "pc_view",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_member` ADD COLUMN `pc_view` int(11) NOT NULL default '0'",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_member",
                'column' => "is_diary_comment_mail",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_member` ADD COLUMN `is_diary_comment_mail` int(1) NOT NULL default '0'",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_ashiato",
                'column' => "is_mobile",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_ashiato` ADD COLUMN `is_mobile` varchar(8) NOT NULL default 'pc'",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_etsuran",
                'column' => "c_commu_topic_id",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_etsuran` ADD COLUMN `c_commu_topic_id` INT( 11 ) NOT NULL DEFAULT '0' AFTER `c_diary_id`;",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_commu",
                'column' => "open_flag",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_commu` ADD COLUMN `open_flag` tinyint(1) NOT NULL default '0';",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_commu",
                'column' => "topic_authority_role",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_commu` ADD COLUMN `topic_authority_role` tinyint(2) NOT NULL default '0';",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_commu_topic",
                'column' => "etsuran_count",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_commu_topic` ADD COLUMN `etsuran_count` INT( 11 ) NOT NULL DEFAULT '0';",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_commu_topic",
                'column' => "open_flag",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_commu_topic` ADD COLUMN `open_flag` tinyint(1) NOT NULL default '0';",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_commu_topic",
                'column' => "e_datetime",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_commu_topic` ADD COLUMN `e_datetime` datetime NOT NULL default '0000-00-00 00:00:00';",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_commu_member",
                'column' => "c_commu_topic_admin",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_commu_member` ADD COLUMN `c_commu_topic_admin` tinyint(1) NOT NULL default '0';",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_diary",
                'column' => "etsuran_count",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_diary` ADD COLUMN `etsuran_count` int(11) NOT NULL default '0';",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_diary",
                'column' => "comment_count",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_diary` ADD COLUMN `comment_count` int(11) NOT NULL default '0';",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_diary",
                'column' => "e_datetime",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_diary` ADD COLUMN `e_datetime` datetime NOT NULL default '0000-00-00 00:00:00';",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_diary_comment",
                'column' => "comment_number",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_diary_comment` ADD COLUMN `comment_number` INT( 11 ) NOT NULL DEFAULT '0'",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_access_log",
                'column' => "ip_address",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_access_log` ADD `ip_address` varchar(16) NOT NULL DEFAULT ''",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_admin_information",
                'column' => "view_date",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_admin_information` ADD `view_date` date NOT NULL default '0000-00-00'",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_image",
                'column' => "c_member_id",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_image` ADD COLUMN `c_member_id` int(11) NOT NULL default '0'",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_one_word",
                'column' => "c_one_word_id_to",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_one_word` ADD COLUMN `c_one_word_id_to` int(11) NOT NULL default '0'",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_member_secure",
                'column' => "pc_address_aes",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_member_secure` ADD COLUMN `pc_address_aes` text NOT NULL default ''",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_member_secure",
                'column' => "ktai_address_aes",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_member_secure` ADD COLUMN `ktai_address_aes` text NOT NULL default ''",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_member_secure",
                'column' => "regist_address_aes",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_member_secure` ADD COLUMN `regist_address_aes` text NOT NULL default ''",
                        ),
                    ),
            array('action' => 'ADD COLUMN',
            'data' => array(
                'name' => "c_member_secure",
                'column' => "easy_access_id_aes",
                'sql'  => "ALTER TABLE `".MYNETS_PREFIX_NAME."c_member_secure` ADD COLUMN `easy_access_id_aes` text NOT NULL default ''",
                        ),
                    ),

            );
?>
