<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Migration_create_table_dashboard_slide extends CI_Migration
{
/**
* Name of the table to be used in this migration!
*
* @var string
*/
protected $_table_name = "dashboard_slide";
public function up()
{
$this->dbforge->add_field(array(
'id' => array(
'type' => "INT",
'constraint' => 11,
'null' => TRUE,
'unsigned' => TRUE//,
// 'auto_increment' => TRUE
),
'name' => array(
'type' => "VARCHAR",
'constraint' => 255,
'null' => TRUE,
),
'interval' => array(
'type' => "DOUBLE",
'null' => TRUE,
),
'user_id' => array(
'type' => "INT",
'constraint' => 11,
'null' => TRUE,
),
));
$this->dbforge->create_table($this->_table_name);
}
public function down()
{
$this->dbforge->drop_table($this->_table_name, TRUE);
}
}