<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * @category	CosmoCommerce
 * @package 	CosmoCommerce_Alipay
 * @copyright	Copyright (c) 2009-2015 CosmoCommerce,LLC. (http://www.cosmocommerce.com)
 * @contact :
 * T: +86-021-66346672
 * L: Shanghai,China
 * M:sales@cosmocommerce.com
 */
$installer = $this;

$installer->startSetup();

Mage::log("Running installer");

$installer->run("

DROP TABLE IF EXISTS `{$this->getTable('alipay_log')}` ;
CREATE TABLE `{$this->getTable('alipay_log')}` (
  `alipay_id` int(10) unsigned NOT NULL auto_increment,
  `log_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `order_id` varchar(16) NOT NULL default '',
  `trade_no` varchar(20) NOT NULL default '',
  `type` varchar(16) NOT NULL default '',
  `post_data` text,
  PRIMARY KEY  (`alipay_id`),
  KEY `log_at` (`log_at`),
  KEY `trade_no` (`trade_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    ");

$installer->endSetup();
