for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Migration: Create_captcha
*
* Created by: Cli for CodeIgniter <https://github.com/kenjis/codeigniter-cli>
* Created on: 2015/05/12 06:00:32
*/
class Migration_Create_captcha extends CI_Migration {
public function up()
{
$this->dbforge->add_field(array(
'captcha_id' => array(
'type' => 'BIGINT',
'constraint' => 13,
'unsigned' => TRUE,
'auto_increment' => TRUE
),
'captcha_time' => array(
'type' => 'INT',
'constraint' => 10,
'ip_address' => array(
'type' => 'VARCHAR',
'constraint' => '45',
'word' => array(
'constraint' => '20',
));
$this->dbforge->add_key('captcha_id', TRUE);
$this->dbforge->add_key('word');
$this->dbforge->create_table('captcha');
}
public function down()
$this->dbforge->drop_table('captcha');