[Migration] Create table thirdparty_logins
thirdparty_logins table will be used to store usernames and passwords for third party services.
这个提交包含在:
父节点
42edb8a5f0
当前提交
264b914b8e
共有 2 个文件被更改,包括 66 次插入 和 1 次删除
|
|
@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE;
|
|||
| be upgraded / downgraded to.
|
||||
|
|
||||
*/
|
||||
$config['migration_version'] = 90;
|
||||
$config['migration_version'] = 91;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* This migration creates a table called options which will hold global options needed within cloudlog
|
||||
* removing the need for lots of configuration files.
|
||||
*/
|
||||
|
||||
class Migration_create_thirdpartylogins_table extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->table_exists('thirdparty_logins')) {
|
||||
$this->dbforge->add_field(array(
|
||||
'service_id' => array(
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE,
|
||||
'unique' => TRUE
|
||||
),
|
||||
|
||||
'user_id' => array(
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'service_name' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'service_password' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'active' => array(
|
||||
'type' => 'BOOLEAN',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'modified' => array(
|
||||
'type' => 'timestamp',
|
||||
'null' => TRUE,
|
||||
)
|
||||
));
|
||||
|
||||
$this->dbforge->add_key('service_id', TRUE);
|
||||
$this->dbforge->add_key('user_id', TRUE);
|
||||
|
||||
$this->dbforge->create_table('thirdparty_logins');
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('thirdparty_logins');
|
||||
}
|
||||
}
|
||||
正在加载…
在新工单中引用