Initial import from local backup (Documents-Playground/pakerpale)
This commit is contained in:
233
application/migrations/20170101000000_api.php
Normal file
233
application/migrations/20170101000000_api.php
Normal file
@@ -0,0 +1,233 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_api extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
|
||||
// api_error_log table
|
||||
$this->dbforge->add_field(array(
|
||||
'el_idx' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 11,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE,
|
||||
'comment' => 'PK',
|
||||
),
|
||||
'el_ip' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'default' => '',
|
||||
'comment' => '접근 아이피',
|
||||
),
|
||||
'el_self' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'default' => '',
|
||||
'comment' => '주소',
|
||||
),
|
||||
'el_vars' => array(
|
||||
'type' => 'TEXT',
|
||||
'null' => true,
|
||||
'comment' => '인자',
|
||||
),
|
||||
'el_result' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'default' => '',
|
||||
'comment' => '결과',
|
||||
),
|
||||
'el_regdate' => array(
|
||||
'type' => 'DATETIME',
|
||||
'null' => true,
|
||||
'comment' => '실행시간',
|
||||
),
|
||||
));
|
||||
$this->dbforge->add_key('el_idx', TRUE);
|
||||
$this->dbforge->create_table('api_error_log');
|
||||
|
||||
|
||||
// api_input table
|
||||
$this->dbforge->add_field(array(
|
||||
'ai_idx' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 11,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE,
|
||||
'comment' => 'PK',
|
||||
),
|
||||
'api_idx' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 11,
|
||||
'unsigned' => TRUE,
|
||||
'default' => '0',
|
||||
'comment' => 'API PK',
|
||||
),
|
||||
'ai_name' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'default' => '',
|
||||
'comment' => '입력 이름',
|
||||
),
|
||||
'ai_type' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'default' => '',
|
||||
'comment' => '입력 종류',
|
||||
),
|
||||
'ai_value' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'default' => '',
|
||||
'comment' => '입력 값',
|
||||
),
|
||||
'ai_ness' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'default' => '',
|
||||
'comment' => '필수 입력 여부',
|
||||
),
|
||||
'ai_exp' => array(
|
||||
'type' => 'TEXT',
|
||||
'null' => true,
|
||||
'comment' => '설명',
|
||||
),
|
||||
'ai_sort' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 11,
|
||||
'unsigned' => TRUE,
|
||||
'default' => '0',
|
||||
'comment' => '정렬',
|
||||
),
|
||||
'ai_bigo' => array(
|
||||
'type' => 'TEXT',
|
||||
'null' => true,
|
||||
'comment' => '비고',
|
||||
),
|
||||
));
|
||||
$this->dbforge->add_key('ai_idx', TRUE);
|
||||
$this->dbforge->create_table('api_input');
|
||||
|
||||
|
||||
|
||||
// api_list table
|
||||
$this->dbforge->add_field(array(
|
||||
'api_idx' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 11,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE,
|
||||
'comment' => 'PK',
|
||||
),
|
||||
'api_name' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'default' => '',
|
||||
'comment' => 'API 이름',
|
||||
),
|
||||
'api_exp' => array(
|
||||
'type' => 'TEXT',
|
||||
'null' => true,
|
||||
'comment' => '설명',
|
||||
),
|
||||
'api_url' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'default' => '',
|
||||
'comment' => '주소',
|
||||
),
|
||||
'api_method' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '10',
|
||||
'default' => '',
|
||||
'comment' => 'METHOD',
|
||||
),
|
||||
'api_use' => array(
|
||||
'type' => 'TINYINT',
|
||||
'constraint' => 3,
|
||||
'unsigned' => TRUE,
|
||||
'default' => '1',
|
||||
'comment' => '사용여부',
|
||||
),
|
||||
'api_bigo' => array(
|
||||
'type' => 'TEXT',
|
||||
'null' => true,
|
||||
'comment' => '비고설명',
|
||||
),
|
||||
));
|
||||
$this->dbforge->add_key('api_idx', TRUE);
|
||||
$this->dbforge->create_table('api_list');
|
||||
|
||||
|
||||
// api_output table
|
||||
$this->dbforge->add_field(array(
|
||||
'ai_idx' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 11,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE,
|
||||
'comment' => 'PK',
|
||||
),
|
||||
'api_idx' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 11,
|
||||
'unsigned' => TRUE,
|
||||
'default' => '0',
|
||||
'comment' => 'API PK',
|
||||
),
|
||||
'ai_name' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'default' => '',
|
||||
'comment' => '설명',
|
||||
),
|
||||
'ai_type' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'default' => '',
|
||||
'comment' => '입력 종류',
|
||||
),
|
||||
'ai_value' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'default' => '',
|
||||
'comment' => '입력 값',
|
||||
),
|
||||
'ai_ness' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'default' => '',
|
||||
'comment' => '필수 입력 여부',
|
||||
),
|
||||
'ai_exp' => array(
|
||||
'type' => 'TEXT',
|
||||
'null' => true,
|
||||
'comment' => '설명',
|
||||
),
|
||||
'ai_sort' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 11,
|
||||
'unsigned' => TRUE,
|
||||
'default' => '0',
|
||||
'comment' => '정렬',
|
||||
),
|
||||
'ai_bigo' => array(
|
||||
'type' => 'TEXT',
|
||||
'null' => true,
|
||||
'comment' => '비고',
|
||||
),
|
||||
));
|
||||
$this->dbforge->add_key('ai_idx', TRUE);
|
||||
$this->dbforge->create_table('api_output');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('api_error_log');
|
||||
$this->dbforge->drop_table('api_input');
|
||||
$this->dbforge->drop_table('api_list');
|
||||
$this->dbforge->drop_table('api_output');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user