mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-23 10:08:38 +00:00
[CW Macros] Database Schema Created
This commit is contained in:
parent
96a747e15c
commit
65b780e2f3
@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE;
|
||||
| be upgraded / downgraded to.
|
||||
|
|
||||
*/
|
||||
$config['migration_version'] = 121;
|
||||
$config['migration_version'] = 122;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
116
application/migrations/122_create_cwmacros_table.php
Normal file
116
application/migrations/122_create_cwmacros_table.php
Normal file
@ -0,0 +1,116 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* This migration creates a table called thirdparty_logins
|
||||
* This table is used to store third party login details
|
||||
*/
|
||||
|
||||
class Migration_create_cwmacros_table extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->table_exists('cwmacros')) {
|
||||
$this->dbforge->add_field(array(
|
||||
'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
|
||||
),
|
||||
|
||||
'station_location_id' => array(
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'function1_name' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'function1_macro' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'function2_name' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'function2_macro' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'function3_name' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'function3_macro' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'function4_name' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'function4_macro' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'function5_name' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'function5_macro' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'modified' => array(
|
||||
'type' => 'timestamp',
|
||||
'null' => TRUE,
|
||||
)
|
||||
));
|
||||
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->add_key('user_id', TRUE);
|
||||
$this->dbforge->add_key('station_location_id', TRUE);
|
||||
|
||||
$this->dbforge->create_table('cwmacros');
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('cwmacros');
|
||||
}
|
||||
}
|
@ -138,4 +138,18 @@ async function readLoop() {
|
||||
//Scroll to the bottom of the text field
|
||||
receiveText.scrollTop = receiveText.scrollHeight;
|
||||
}
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
var container = document.getElementById("modals-here")
|
||||
var backdrop = document.getElementById("modal-backdrop")
|
||||
var modal = document.getElementById("modal")
|
||||
|
||||
modal.classList.remove("show")
|
||||
backdrop.classList.remove("show")
|
||||
|
||||
setTimeout(function() {
|
||||
container.removeChild(backdrop)
|
||||
container.removeChild(modal)
|
||||
}, 200)
|
||||
}
|
Loading…
Reference in New Issue
Block a user