function up()
 {
     // get the driver used
     \Config::load('auth', true);
     $drivers = \Config::get('auth.driver', array());
     is_array($drivers) or $drivers = array($drivers);
     if (in_array('Simpleauth', $drivers)) {
         // get the tablename
         \Config::load('simpleauth', true);
         $table = \Config::get('simpleauth.table_name', 'users') . '_providers';
         // make sure the configured DB is used
         \DBUtil::set_connection(\Config::get('simpleauth.db_connection', null));
     } elseif (in_array('Ormauth', $drivers)) {
         // get the tablename
         \Config::load('ormauth', true);
         $table = \Config::get('ormauth.table_name', 'users') . '_providers';
         // make sure the configured DB is used
         \DBUtil::set_connection(\Config::get('ormauth.db_connection', null));
     }
     if (isset($table)) {
         \DBUtil::create_table($table, array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'parent_id' => array('type' => 'int', 'constraint' => 11, 'default' => 0), 'provider' => array('type' => 'varchar', 'constraint' => 50), 'uid' => array('type' => 'varchar', 'constraint' => 255), 'secret' => array('type' => 'varchar', 'constraint' => 255, 'null' => true), 'access_token' => array('type' => 'varchar', 'constraint' => 255, 'null' => true), 'expires' => array('type' => 'int', 'constraint' => 12, 'default' => 0, 'null' => true), 'refresh_token' => array('type' => 'varchar', 'constraint' => 255, 'null' => true), 'user_id' => array('type' => 'int', 'constraint' => 11, 'default' => 0), 'created_at' => array('type' => 'int', 'constraint' => 11, 'default' => 0), 'updated_at' => array('type' => 'int', 'constraint' => 11, 'default' => 0)), array('id'));
         \DBUtil::create_index($table, 'parent_id', 'parent_id');
     }
     // reset any DBUtil connection set
     \DBUtil::set_connection(null);
 }
 public function up()
 {
     \DBUtil::create_table('crm_ppi_refund', array('claim_id' => array('constraint' => 11, 'type' => 'int'), 'method_id' => array('constraint' => 11, 'type' => 'int'), 'refund_amount' => array('constraint' => 11, 'type' => 'int'), 'invoice_amount' => array('constraint' => 11, 'type' => 'int'), 'invoice_sent_date' => array('type' => 'datetime'), 'paid' => array('constraint' => "'yes','no'", 'type' => 'enum', 'default' => 'no'), 'invoice_paid_date' => array('type' => 'datetime')), array('claim_id'));
     //Adding indexes to id fields
     $active_db = \Config::get('db.active');
     \DB::query("ALTER TABLE `crm_ppi_refund` ADD INDEX ( `claim_id` )")->execute();
 }
 public function up()
 {
     \DBUtil::create_table('statistics', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'seller_id' => array('type' => 'int', 'constraint' => 11), 'type' => array('type' => 'varchar', 'constraint' => 50), 'name' => array('type' => 'varchar', 'constraint' => 255), 'value' => array('type' => 'text'), 'date' => array('type' => 'date')), array('id'));
     \DBUtil::create_index('statistics', 'seller_id', 'seller_id');
     \DBUtil::create_index('statistics', array('seller_id', 'type'), 'seller_type');
     \DBUtil::create_index('statistics', array('seller_id', 'type', 'name'), 'seller_type_name');
 }
示例#4
0
 public function up()
 {
     \DBUtil::create_table('menu', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true, 'unsigned' => true), 'left_id' => array('constraint' => 11, 'type' => 'int', 'unsigned' => true), 'right_id' => array('constraint' => 11, 'type' => 'int', 'unsigned' => true), 'tree_id' => array('constraint' => 11, 'type' => 'int', 'unsigned' => true), 'name' => array('constraint' => 252, 'type' => 'varchar'), 'slug' => array('constraint' => 255, 'type' => 'varchar', 'null' => true), 'url' => array('constraint' => 255, 'type' => 'varchar', 'null' => true), 'fields' => array('type' => 'text', 'null' => true)), array('id'));
     \DBUtil::create_index('menu', 'left_id');
     \DBUtil::create_index('menu', 'right_id');
     \DBUtil::create_table('menu_meta', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'menu_id' => array('constraint' => 11, 'type' => 'int'), 'key' => array('type' => 'text'), 'value' => array('type' => 'text')), array('id'));
 }
 public function up()
 {
     \DBUtil::create_table('crm_referrals', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'user_id' => array('constraint' => 11, 'type' => 'int'), 'introducer_id' => array('constraint' => 11, 'type' => 'int'), 'company_id' => array('constraint' => 11, 'type' => 'int'), 'product_id' => array('constraint' => 11, 'type' => 'int'), 'dialler_lead_id' => array('constraint' => 11, 'type' => 'int'), 'dialler_list_id' => array('constraint' => 11, 'type' => 'int'), 'dialler_list_name' => array('constraint' => 11, 'type' => 'int'), 'referral_date' => array('type' => 'datetime'), 'disposition_id' => array('constraint' => 11, 'type' => 'int'), 'title' => array('constraint' => 5, 'type' => 'varchar'), 'forename' => array('constraint' => 100, 'type' => 'varchar'), 'surname' => array('constraint' => 100, 'type' => 'varchar'), 'street_and_number' => array('constraint' => 100, 'type' => 'varchar'), 'area' => array('constraint' => 100, 'type' => 'varchar'), 'district' => array('constraint' => 100, 'type' => 'varchar'), 'town' => array('constraint' => 100, 'type' => 'varchar'), 'county' => array('constraint' => 100, 'type' => 'varchar'), 'country_id' => array('constraint' => 100, 'type' => 'varchar'), 'post_code' => array('constraint' => 100, 'type' => 'varchar'), 'date_of_birth' => array('type' => 'date'), 'tel_home' => array('constraint' => 11, 'type' => 'bigint'), 'tel_work' => array('constraint' => 11, 'type' => 'bigint'), 'tel_mobile' => array('constraint' => 11, 'type' => 'bigint'), 'email' => array('constraint' => 100, 'type' => 'varchar'), 'notes' => array('type' => 'text')), array('id'));
     \DB::query("ALTER TABLE `crm_referrals` ADD INDEX ( `user_id` )")->execute();
     \DB::query("ALTER TABLE `crm_referrals` ADD INDEX ( `company_id` )")->execute();
     \DB::query("ALTER TABLE `crm_referrals` ADD INDEX ( `disposition_id` )")->execute();
 }
 public function up()
 {
     \DBUtil::create_table('customer_gateways', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'customer_id' => array('type' => 'int', 'constraint' => 11), 'gateway_id' => array('type' => 'int', 'constraint' => 11), 'external_id' => array('type' => 'varchar', 'constraint' => 255, 'null' => true)), array('id'));
     \DBUtil::create_index('customer_gateways', 'customer_id', 'customer_id');
     \DBUtil::create_index('customer_gateways', 'gateway_id', 'gateway_id');
     \DBUtil::create_index('customer_gateways', array('customer_id', 'gateway_id'), 'customer_gateway', 'unique');
 }
 public function up()
 {
     \DBUtil::create_table('crm_client_access_log', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'client_id' => array('constraint' => 11, 'type' => 'int'), 'user_id' => array('constraint' => 11, 'type' => 'int'), 'access_date' => array('type' => 'datetime')), array('id'));
     // \DB::query("ALTER TABLE `crm_client_access_log` ADD PRIMARY KEY ( `id` )")->execute();
     \DB::query("ALTER TABLE `crm_client_access_log` ADD INDEX ( `client_id` )")->execute();
     \DB::query("ALTER TABLE `crm_client_access_log` ADD INDEX ( `user_id` )")->execute();
 }
 function up()
 {
     // get the drivers defined
     $drivers = normalize_driver_types();
     if (in_array('Simpleauth', $drivers)) {
         // get the tablename
         \Config::load('simpleauth', true);
         $basetable = \Config::get('simpleauth.table_name', 'users');
         // make sure the configured DB is used
         \DBUtil::set_connection(\Config::get('simpleauth.db_connection', null));
     } elseif (in_array('Ormauth', $drivers)) {
         // get the tablename
         \Config::load('ormauth', true);
         $basetable = \Config::get('ormauth.table_name', 'users');
         // make sure the configured DB is used
         \DBUtil::set_connection(\Config::get('ormauth.db_connection', null));
     } else {
         $basetable = 'users';
     }
     \DBUtil::create_table($basetable . '_clients', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'name' => array('type' => 'varchar', 'constraint' => 32, 'default' => ''), 'client_id' => array('type' => 'varchar', 'constraint' => 32, 'default' => ''), 'client_secret' => array('type' => 'varchar', 'constraint' => 32, 'default' => ''), 'redirect_uri' => array('type' => 'varchar', 'constraint' => 255, 'default' => ''), 'auto_approve' => array('type' => 'tinyint', 'constraint' => 1, 'default' => 0), 'autonomous' => array('type' => 'tinyint', 'constraint' => 1, 'default' => 0), 'status' => array('type' => 'enum', 'constraint' => '"development","pending","approved","rejected"', 'default' => 'development'), 'suspended' => array('type' => 'tinyint', 'constraint' => 1, 'default' => 0), 'notes' => array('type' => 'tinytext')), array('id'));
     \DBUtil::create_index($basetable . '_clients', 'client_id', 'client_id', 'UNIQUE');
     \DBUtil::create_table($basetable . '_sessions', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'client_id' => array('type' => 'varchar', 'constraint' => 32, 'default' => ''), 'redirect_uri' => array('type' => 'varchar', 'constraint' => 255, 'default' => ''), 'type_id' => array('type' => 'varchar', 'constraint' => 64), 'type' => array('type' => 'enum', 'constraint' => '"user","auto"', 'default' => 'user'), 'code' => array('type' => 'text'), 'access_token' => array('type' => 'varchar', 'constraint' => 50, 'default' => ''), 'stage' => array('type' => 'enum', 'constraint' => '"request","granted"', 'default' => 'request'), 'first_requested' => array('type' => 'int', 'constraint' => 11), 'last_updated' => array('type' => 'int', 'constraint' => 11), 'limited_access' => array('type' => 'tinyint', 'constraint' => 1, 'default' => 0)), array('id'), true, false, null, array(array('constraint' => 'oauth_sessions_ibfk_1', 'key' => 'client_id', 'reference' => array('table' => $basetable . '_clients', 'column' => 'client_id'), 'on_delete' => 'CASCADE')));
     \DBUtil::create_table($basetable . '_scopes', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'scope' => array('type' => 'varchar', 'constraint' => 64, 'default' => ''), 'name' => array('type' => 'varchar', 'constraint' => 64, 'default' => ''), 'description' => array('type' => 'varchar', 'constraint' => 255, 'default' => '')), array('id'));
     \DBUtil::create_index($basetable . '_scopes', 'scope', 'scope', 'UNIQUE');
     \DBUtil::create_table($basetable . '_sessionscopes', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'session_id' => array('type' => 'int', 'constraint' => 11), 'access_token' => array('type' => 'varchar', 'constraint' => 50, 'default' => ''), 'scope' => array('type' => 'varchar', 'constraint' => 64, 'default' => '')), array('id'), true, false, null, array(array('constraint' => 'oauth_sessionscopes_ibfk_1', 'key' => 'scope', 'reference' => array('table' => $basetable . '_scopes', 'column' => 'scope')), array('constraint' => 'oauth_sessionscopes_ibfk_2', 'key' => 'session_id', 'reference' => array('table' => $basetable . '_sessions', 'column' => 'id'), 'on_delete' => 'CASCADE')));
     \DBUtil::create_index($basetable . '_sessionscopes', 'session_id', 'session_id');
     \DBUtil::create_index($basetable . '_sessionscopes', 'access_token', 'access_token');
     \DBUtil::create_index($basetable . '_sessionscopes', 'scope', 'scope');
     // reset any DBUtil connection set
     \DBUtil::set_connection(null);
 }
 public function up()
 {
     // -- [ Scripts Forms Table ]
     // --------------------------
     \DBUtil::create_table('scripts_forms', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'name' => array('constraint' => 200, 'type' => 'varchar'), 'active' => array('constraint' => "'yes','no'", 'type' => 'enum', 'default' => 'yes'), 'created_at' => array('constraint' => 11, 'type' => 'int')), array('id'));
     // -- [ Script Form Questions ]
     // ----------------------------
     \DBUtil::create_table('scripts_forms_questions', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'script_form_id' => array('constraint' => 11, 'type' => 'int'), 'question' => array('constraint' => 200, 'type' => 'varchar'), 'type_field_id' => array('constraint' => 11, 'type' => 'int'), 'required' => array('constraint' => "'yes','no'", 'type' => 'enum', 'default' => 'yes')), array('id'));
     // -- [ Script Form Types ]
     // ------------------------
     \DBUtil::create_table('type_scripts_forms_fields', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'description' => array('constraint' => 100, 'type' => 'varchar'), 'type' => array('constraint' => 50, 'type' => 'varchar'), 'ajax_call' => array('constraint' => 300, 'type' => 'varchar')), array('id'));
     // -- [ Script Type Defaults]
     // --------------------------
     \DB::insert('type_scripts_forms_fields')->set(array('description' => 'Textbox', 'type' => 'text'))->execute();
     \DB::insert('type_scripts_forms_fields')->set(array('description' => 'Textarea', 'type' => 'textarea'))->execute();
     \DB::insert('type_scripts_forms_fields')->set(array('description' => 'Checkboxes', 'type' => 'checkbox'))->execute();
     \DB::insert('type_scripts_forms_fields')->set(array('description' => 'Radio Buttons', 'type' => 'radio'))->execute();
     \DB::insert('type_scripts_forms_fields')->set(array('description' => 'Select Menu', 'type' => 'select'))->execute();
     // -- [ Script Form Answers ]
     // --------------------------
     \DBUtil::create_table('scripts_forms_answers', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'script_forms_question_id' => array('constraint' => 11, 'type' => 'int'), 'option_name' => array('constraint' => 200, 'type' => 'varchar'), 'option_value' => array('constraint' => 200, 'type' => 'varchar')), array('id'));
     // -- [ Script Form Responses ]
     // ----------------------------
     \DBUtil::create_table('scripts_forms_responses', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'script_forms_id' => array('constraint' => 11, 'type' => 'int'), 'script_forms_question_id' => array('constraint' => 11, 'type' => 'int'), 'script_forms_answer_id' => array('constraint' => 11, 'type' => 'int'), 'reference_group' => array('constraint' => 200, 'type' => 'varchar'), 'reference' => array('constraint' => 200, 'type' => 'varchar')), array('id'));
 }
 public function up()
 {
     \DBUtil::create_table('crm_ppi_correspondence', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'claim_id' => array('constraint' => 11, 'type' => 'int'), 'stage_id' => array('constraint' => 11, 'type' => 'int'), 'user_id' => array('constraint' => 11, 'type' => 'int'), 'date' => array('type' => 'datetime'), 'notes' => array('constraint' => 11, 'type' => 'text')), array('id'));
     //Adding indexes to id fields
     $active_db = \Config::get('db.active');
     \DB::query("ALTER TABLE `crm_ppi_correspondence` ADD INDEX ( `claim_id` )")->execute();
 }
示例#11
0
 /**
  * create the sessions table
  * php oil r session:create
  */
 public static function create()
 {
     // load session config
     \Config::load('session', true);
     if (\Config::get('session.driver') != 'db') {
         // prompt the user to confirm they want to remove the table.
         $continue = \Cli::prompt(\Cli::color('Your current driver type is not set db. Would you like to continue and add the sessions table anyway?', 'yellow'), array('y', 'n'));
         if ($continue === 'n') {
             return \Cli::color('Database sessions table was not created.', 'red');
         }
     }
     if (\DBUtil::table_exists(\Config::get('session.db.table'))) {
         return \Cli::write('Session table already exists.');
     }
     // create the session table using the table name from the config file
     \DBUtil::create_table(\Config::get('session.db.table'), array('session_id' => array('constraint' => 40, 'type' => 'varchar'), 'previous_id' => array('constraint' => 40, 'type' => 'varchar'), 'user_agent' => array('type' => 'text', 'null' => false), 'ip_hash' => array('constraint' => 32, 'type' => 'char'), 'created' => array('constraint' => 10, 'type' => 'int', 'unsigned' => true), 'updated' => array('constraint' => 10, 'type' => 'int', 'unsigned' => true), 'payload' => array('type' => 'longtext')), array('session_id'), false, 'InnoDB', \Config::get('db.default.charset'));
     // make previous_id a unique_key. speeds up query and prevents duplicate id's
     \DBUtil::create_index(\Config::get('session.db.table'), 'previous_id', 'previous_id', 'unique');
     if (\Config::get('session.driver') === 'db') {
         // return success message.
         return \Cli::color('Success! Your session table has been created!', 'green');
     } else {
         // return success message notifying that the driver is not db.
         return \Cli::color('Success! Your session table has been created! Your current session driver type is set to ' . \Config::get('session.driver') . '. In order to use the table you just created to manage your sessions, you will need to set your driver type to "db" in your session config file.', 'green');
     }
 }
 public function up()
 {
     \DBUtil::create_table('location', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'title' => array('constraint' => 255, 'type' => 'varchar')), array('id'));
     \DBUtil::create_table('events', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'title' => array('constraint' => 255, 'type' => 'varchar'), 'description' => array('type' => 'text', 'null' => true), 'location_id' => array('constraint' => 11, 'type' => 'int'), 'start' => array('type' => 'datetime'), 'poster' => array('constraint' => 255, 'type' => 'varchar', 'null' => true)), array('id'));
     \DBUtil::create_table('agenda', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'title' => array('constraint' => 255, 'type' => 'varchar'), 'event_id' => array('constraint' => 11, 'type' => 'int')), array('id'));
     \DBUtil::create_table('countries', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'name' => array('constraint' => 255, 'type' => 'varchar'), 'iso_code' => array('constraint' => 255, 'type' => 'varchar'), 'created_at' => array('constraint' => 11, 'type' => 'int'), 'updated_at' => array('constraint' => 11, 'type' => 'int')), array('id'));
     \DBUtil::create_table('users', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'username' => array('constraint' => 50, 'type' => 'varchar'), 'password' => array('constraint' => 255, 'type' => 'varchar'), 'group' => array('constraint' => 11, 'type' => 'int'), 'email' => array('constraint' => 255, 'type' => 'varchar'), 'last_login' => array('constraint' => 25, 'type' => 'varchar'), 'login_hash' => array('constraint' => 255, 'type' => 'varchar'), 'profile_fields' => array('type' => 'text'), 'created_at' => array('constraint' => 11, 'type' => 'int')), array('id'));
 }
 public function up()
 {
     \DBUtil::create_table('blog_category', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true, 'unsigned' => true), 'name' => array('constraint' => 255, 'type' => 'varchar'), 'slug' => array('constraint' => 255, 'type' => 'varchar'), 'post_count' => array('constraint' => 11, 'type' => 'int'), 'created_at' => array('constraint' => 11, 'type' => 'int', 'null' => true), 'updated_at' => array('constraint' => 11, 'type' => 'int', 'null' => true)), array('id'));
     \Model_Category::forge(array('name' => 'Category #1', 'slug' => 'category-1', 'post_count' => 3))->save();
     \Model_Category::forge(array('name' => 'Category #2', 'slug' => 'category-2', 'post_count' => 1))->save();
     \Model_Category::forge(array('name' => 'Category #3', 'slug' => 'category-3', 'post_count' => 0))->save();
     \Model_Category::forge(array('name' => 'Category #4', 'slug' => 'category-4', 'post_count' => 0))->save();
 }
 public function up()
 {
     \DBUtil::create_table('crm_ppi_clients', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'client_id' => array('constraint' => 11, 'type' => 'int'), 'company_id' => array('constraint' => 11, 'type' => 'int'), 'referral_id' => array('constraint' => 11, 'type' => 'int'), 'user_id' => array('constraint' => 11, 'type' => 'int'), 'account_status' => array('constraint' => 11, 'type' => 'int'), 'account_created' => array('type' => 'datetime')), array('id'));
     //Adding indexes to id fields
     $active_db = \Config::get('db.active');
     \DB::query("ALTER TABLE `crm_ppi_clients` ADD INDEX ( `client_id` )")->execute();
     \DB::query("ALTER TABLE `crm_ppi_clients` ADD INDEX ( `account_status` )")->execute();
 }
示例#15
0
 public function up()
 {
     \DBUtil::create_table($this->table_name, array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'group' => array('constraint' => 20, 'type' => 'varchar'), 'name' => array('constraint' => 20, 'type' => 'varchar'), 'title' => array('constraint' => 50, 'type' => 'varchar'), 'title_en' => array('constraint' => 50, 'type' => 'varchar'), 'seq' => array('constraint' => 11, 'type' => 'int'), 'link' => array('constraint' => 255, 'type' => 'varchar', 'null' => true), 'has_sub' => array('constraint' => 1, 'type' => 'char', 'default' => 'N'), 'parent' => array('constraint' => 20, 'type' => 'varchar', 'null' => true), 'level' => array('constraint' => 11, 'type' => 'int', 'null' => true)), array('id'), true, 'InnoDB', 'utf8_general_ci');
     // add UNIQUE index for username and email fields
     $active_db = \Config::get('db.active');
     $table_prefix = \Config::get('db.' . $active_db . '.table_prefix');
     \DB::query("CREATE UNIQUE INDEX menu_name ON " . $table_prefix . $this->table_name . " (name)")->execute();
 }
 public function up()
 {
     \DBUtil::create_table('scripts_forms_responses_log', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'referral_id' => array('constraint' => 11, 'type' => 'int'), 'client_id' => array('constraint' => 11, 'type' => 'int'), 'script_type_id' => array('constraint' => 11, 'type' => 'int'), 'user_id' => array('constraint' => 11, 'type' => 'int'), 'created_at' => array('constraint' => 11, 'type' => 'int')), array('id'));
     // -- Change the referrence field on the scripts_forms_responses
     // -------------------------------------------------------------
     \DB::query("ALTER TABLE `scripts_forms_responses` DROP `reference`")->execute();
     \DB::query("ALTER TABLE  `scripts_forms_responses` ADD  `response_log_id` INT UNSIGNED NOT NULL AFTER  `id` ,ADD INDEX (  `response_log_id` )")->execute();
 }
示例#17
0
	public function up()
	{
		\DBUtil::create_table('settings', array(
			'id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true),
			'last_short_id' => array('constraint' => 255, 'type' => 'varchar'),
			'site_enabled' => array('constraint' => 1, 'type' => 'int'),

		), array('id'));
	}
 function up()
 {
     // get the configured table name
     $table = \Config::get('simpleauth.table_name', 'users');
     // table users
     \DBUtil::create_table($table, array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'username' => array('type' => 'varchar', 'constraint' => 50), 'password' => array('type' => 'varchar', 'constraint' => 255), 'group' => array('type' => 'int', 'constraint' => 11, 'default' => 1), 'email' => array('type' => 'varchar', 'constraint' => 255), 'last_login' => array('type' => 'varchar', 'constraint' => 25), 'login_hash' => array('type' => 'varchar', 'constraint' => 255), 'profile_fields' => array('type' => 'text'), 'created_at' => array('type' => 'int', 'constraint' => 11, 'default' => 0)), array('id'));
     // add a unique index on username and email
     \DBUtil::create_index('users', array('username', 'email'), 'username', 'UNIQUE');
 }
 public function up()
 {
     \DBUtil::create_table('crm_ppi_claims', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'ppi_client_id' => array('constraint' => 11, 'type' => 'int'), 'creditor_id' => array('constraint' => 11, 'type' => 'int'), 'claim_sent_date' => array('type' => 'datetime'), 'status_id' => array('constraint' => 11, 'type' => 'int'), 'stage_id' => array('constraint' => 11, 'type' => 'int'), 'last_contact' => array('type' => 'datetime')), array('id'));
     //Adding indexes to id fields
     $active_db = \Config::get('db.active');
     \DB::query("ALTER TABLE `crm_ppi_claims` ADD INDEX ( `ppi_client_id` )")->execute();
     \DB::query("ALTER TABLE `crm_ppi_claims` ADD INDEX ( `status_id` )")->execute();
     \DB::query("ALTER TABLE `crm_ppi_claims` ADD INDEX (`stage_id`)")->execute();
 }
 public function up()
 {
     \DBUtil::create_table('users', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true, 'unsigned' => true), 'username' => array('constraint' => 50, 'type' => 'varchar'), 'password' => array('constraint' => 255, 'type' => 'varchar'), 'group_id' => array('constraint' => 11, 'type' => 'int'), 'email' => array('constraint' => 255, 'type' => 'varchar'), 'last_login' => array('constraint' => 25, 'type' => 'varchar'), 'previous_login' => array('constraint' => 25, 'type' => 'varchar'), 'login_hash' => array('constraint' => 255, 'type' => 'varchar'), 'user_id' => array('constraint' => 11, 'type' => 'int'), 'created_at' => array('constraint' => 11, 'type' => 'int', 'null' => true), 'updated_at' => array('constraint' => 11, 'type' => 'int', 'null' => true), 'deleted_at' => array('constraint' => 11, 'type' => 'int', 'null' => true)), array('id'));
     // Create admin user
     //       \Auth::instance()->create_user('admin','admin','*****@*****.**','100');
     //       \Auth::instance()->create_user('*****@*****.**','Daniel','*****@*****.**','100');
     //       \Auth::instance()->create_user('*****@*****.**','Tyler','*****@*****.**','100');
     //       \Auth::instance()->create_user('*****@*****.**','Stefano','*****@*****.**','100');
 }
 public function up()
 {
     \Config::load('sentry', true);
     \DBUtil::create_table(\Config::get('sentry.table.users'), array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'username' => array('constraint' => 50, 'type' => 'varchar'), 'email' => array('constraint' => 50, 'type' => 'varchar'), 'password' => array('constraint' => 81, 'type' => 'varchar'), 'password_reset_hash' => array('constraint' => 81, 'type' => 'varchar'), 'temp_password' => array('constraint' => 81, 'type' => 'varchar'), 'remember_me' => array('constraint' => 81, 'type' => 'varchar'), 'activation_hash' => array('constraint' => 81, 'type' => 'varchar'), 'last_login' => array('constraint' => 11, 'type' => 'int'), 'ip_address' => array('constraint' => 50, 'type' => 'varchar'), 'updated_at' => array('constraint' => 11, 'type' => 'int'), 'created_at' => array('constraint' => 11, 'type' => 'int'), 'status' => array('constraint' => 1, 'type' => 'tinyint'), 'activated' => array('contsraint' => 1, 'type' => 'tinyint')), array('id'));
     \DBUtil::create_table(\Config::get('sentry.table.users_metadata'), array('user_id' => array('constraint' => 11, 'type' => 'int'), 'first_name' => array('constraint' => 50, 'type' => 'varchar'), 'last_name' => array('constraint' => 50, 'type' => 'varchar')), array('user_id'));
     \DBUtil::create_table(\Config::get('sentry.table.groups'), array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'name' => array('constraint' => 200, 'type' => 'varchar'), 'level' => array('constraint' => 11, 'type' => 'int'), 'is_admin' => array('constraint' => 1, 'type' => 'tinyint')), array('id'));
     \DBUtil::create_table(\Config::get('sentry.table.users_suspended'), array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'login_id' => array('constraint' => 50, 'type' => 'varchar'), 'attempts' => array('constraint' => 50, 'type' => 'int'), 'ip' => array('constraint' => 25, 'type' => 'varchar'), 'last_attempt_at' => array('constraint' => 11, 'type' => 'int'), 'suspended_at' => array('constraint' => 11, 'type' => 'int'), 'unsuspend_at' => array('constraint' => 11, 'type' => 'int')), array('id'));
     \DBUtil::create_table(\Config::get('sentry.table.users_groups'), array('user_id' => array('constraint' => 11, 'type' => 'int'), 'group_id' => array('constraint' => 11, 'type' => 'int')));
 }
 function up()
 {
     \DBUtil::create_table('accounts', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'consumer_key' => array('type' => 'varchar', 'constraint' => 36), 'consumer_secret' => array('type' => 'varchar', 'constraint' => 122), 'access_level' => array('type' => 'int', 'constraint' => 1, 'default' => 1), 'max_calls' => array('type' => 'int', 'constraint' => 1, 'default' => 0), 'reset_usage' => array('type' => 'int', 'constraint' => 11), 'free_account_on' => array('type' => 'int', 'constraint' => 11), 'can_run_inactive' => array('type' => 'int', 'constraint' => 1, 'default' => 0), 'acl_type' => array('type' => 'int', 'constraint' => 1, 'default' => 1), 'link_back' => array('type' => 'int', 'constraint' => 1, 'default' => 0), 'js_calls_allowed' => array('type' => 'int', 'constraint' => 1, 'default' => 1), 'store_credentials' => array('type' => 'int', 'constraint' => 1, 'default' => 1), 'created_at' => array('type' => 'int', 'constraint' => 11, 'default' => 0), 'updated_at' => array('type' => 'int', 'constraint' => 11, 'default' => 0), 'deleted_at' => array('type' => 'varchar', 'constraint' => 11, 'default' => null, 'null' => true)), array('id'));
     \DBUtil::create_table('accounts_metadata', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'account_id' => array('type' => 'int', 'constraint' => 11), 'key' => array('type' => 'varchar', 'constraint' => 20), 'value' => array('type' => 'text'), 'created_at' => array('type' => 'int', 'constraint' => 11, 'default' => 0), 'updated_at' => array('type' => 'int', 'constraint' => 11, 'default' => 0), 'deleted_at' => array('type' => 'varchar', 'constraint' => 11, 'default' => null, 'null' => true)), array('id'));
     \DBUtil::create_table('apis', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'account_id' => array('type' => 'int', 'constraint' => 11), 'name' => array('type' => 'varchar', 'constraint' => 50), 'min_access_level' => array('type' => 'int', 'constraint' => 1, 'default' => 1), 'active_level' => array('type' => 'int', 'constraint' => 1), 'private' => array('type' => 'int', 'constraint' => 1), 'secret' => array('type' => 'varchar', 'constraint' => 122), 'force_validation' => array('type' => 'int', 'constraint' => 1), 'allow_custom_dynamic' => array('type' => 'int', 'constraint' => 1, 'default' => 1), 'created_at' => array('type' => 'int', 'constraint' => 11, 'default' => 0), 'updated_at' => array('type' => 'int', 'constraint' => 11, 'default' => 0), 'deleted_at' => array('type' => 'varchar', 'constraint' => 11, 'default' => null, 'null' => true)), array('id'));
     \DBUtil::create_table('apis_metadata', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'apis_id' => array('type' => 'int', 'constraint' => 11), 'key' => array('type' => 'varchar', 'constraint' => 20), 'value' => array('type' => 'text'), 'created_at' => array('type' => 'int', 'constraint' => 11, 'default' => 0), 'updated_at' => array('type' => 'int', 'constraint' => 11, 'default' => 0), 'deleted_at' => array('type' => 'varchar', 'constraint' => 11, 'default' => null, 'null' => true)), array('id'));
     \DBUtil::create_table('api_stats', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'apis_id' => array('type' => 'int', 'constraint' => 11), 'code' => array('type' => 'int', 'constraint' => 3), 'call' => array('type' => 'varchar', 'constraint' => 150), 'is_static' => array('type' => 'int', 'constraint' => 1), 'count' => array('type' => 'int', 'constraint' => 11), 'created_at' => array('type' => 'int', 'constraint' => 11, 'default' => 0), 'updated_at' => array('type' => 'int', 'constraint' => 11, 'default' => 0)), array('id'));
     \DBUtil::create_table('data_calls', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'account_id' => array('type' => 'int', 'constraint' => 11), 'name' => array('type' => 'varchar', 'constraint' => 50), 'call_script' => array('type' => 'text'), 'active_level' => array('type' => 'int', 'constraint' => 1), 'min_access_level' => array('type' => 'int', 'constraint' => 1, 'default' => 1), 'created_at' => array('type' => 'int', 'constraint' => 11, 'default' => 0), 'updated_at' => array('type' => 'int', 'constraint' => 11, 'default' => 0), 'deleted_at' => array('type' => 'varchar', 'constraint' => 11, 'default' => null, 'null' => true)), array('id'));
 }
示例#23
0
 function up()
 {
     // only do this if it doesn't exist yet
     if (!\DBUtil::table_exists('users')) {
         // table users
         \DBUtil::create_table('users', array('id' => array('type' => 'integer primary key', 'autoincrement' => true), 'username' => array('type' => 'text'), 'password' => array('type' => 'text'), 'group' => array('type' => 'integer', 'default' => 1), 'email' => array('type' => 'text'), 'last_login' => array('type' => 'text'), 'login_hash' => array('type' => 'text'), 'profile_fields' => array('type' => 'text'), 'created_at' => array('type' => 'integer', 'default' => 0), 'updated_at' => array('type' => 'integer', 'default' => 0)));
         // add a unique index on username and email
         \DBUtil::create_index('users', array('username', 'email'), 'username', 'UNIQUE');
     }
 }
示例#24
0
 public function up()
 {
     \DBUtil::create_table($this->table, array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'code' => array('constraint' => 10, 'type' => 'varchar'), 'first_name' => array('constraint' => 50, 'type' => 'varchar'), 'last_name' => array('constraint' => 50, 'type' => 'varchar'), 'first_name_en' => array('constraint' => 50, 'type' => 'varchar', 'null' => true), 'last_name_en' => array('constraint' => 50, 'type' => 'varchar', 'null' => true), 'salutation_code' => array('type' => 'tinyint'), 'birthdate' => array('type' => 'date'), 'dept_code' => array('type' => 'tinyint', 'null' => true), 'group_code' => array('type' => 'tinyint', 'null' => true), 'unit_code' => array('type' => 'tinyint', 'null' => true), 'type' => array('type' => 'tinyint'), 'salary' => array('type' => 'float'), 'wage' => array('type' => 'float'), 'pay_via' => array('type' => 'tinyint'), 'bank_code' => array('type' => 'tinyint'), 'account_no' => array('constraint' => 13, 'type' => 'varchar', 'null' => true), 'id_no' => array('constraint' => 13, 'type' => 'varchar'), 'ss_no' => array('constraint' => 13, 'type' => 'varchar', 'null' => true), 'status' => array('type' => 'tinyint'), 'profile' => array('type' => 'text', 'null' => true), 'created_at' => array('constraint' => 11, 'type' => 'int'), 'updated_at' => array('constraint' => 11, 'type' => 'int', 'null' => true)), array('id'), true, 'InnoDB', 'utf8_general_ci');
     // add UNIQUE index for username and email fields
     $active_db = \Config::get('db.active');
     $table_prefix = \Config::get('db.' . $active_db . '.table_prefix');
     \DB::query("CREATE UNIQUE INDEX code ON " . $table_prefix . $this->table . " (code)")->execute();
     \DB::query("CREATE UNIQUE INDEX id_no ON " . $table_prefix . $this->table . " (id_no)")->execute();
     \DB::query("CREATE UNIQUE INDEX ss_no ON " . $table_prefix . $this->table . " (ss_no)")->execute();
 }
 public function up()
 {
     if (\DBUtil::table_exists('task_queues')) {
         return;
     }
     // -------------------------
     // task_queues
     // -------------------------
     \DBUtil::create_table('task_queues', array('id' => array('type' => 'int', 'constraint' => 10, 'unsigned' => true, 'auto_increment' => true), 'method' => array('type' => 'varchar', 'constraint' => 255), 'options' => array('type' => 'varchar', 'constraint' => 255, 'comment' => 'json format'), 'duplicate_type' => array('type' => 'tinyint', 'default' => 0, 'comment' => '0:no limit setting, 1~:limit is refered from config file'), 'job_status' => array('type' => 'tinyint', 'default' => 0, 'comment' => '0:wait, 1:exec, 2:success, 3:error'), 'deleted' => array('type' => 'tinyint', 'default' => \Config::get('queue.logical_delete.not_deleted')), 'created_at' => array('type' => 'datetime', 'null' => true), 'updated_at' => array('type' => 'datetime', 'null' => true), 'timestamp' => array('type' => 'timestamp', 'default' => \DB::expr('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'))), array('id'), true, 'InnoDB', 'utf8');
 }
 public function up()
 {
     \DBUtil::create_table('crm_client_partner_details', array('client_id' => array('constraint' => 11, 'type' => 'int'), 'title' => array('constraint' => 5, 'type' => 'varchar'), 'forename' => array('constraint' => 100, 'type' => 'varchar'), 'surname' => array('constraint' => 100, 'type' => 'varchar'), 'gender_id' => array('constraint' => 11, 'type' => 'int'), 'street_and_number' => array('constraint' => 200, 'type' => 'varchar'), 'area' => array('constraint' => 200, 'type' => 'varchar'), 'district' => array('constraint' => 200, 'type' => 'varchar'), 'town' => array('constraint' => 200, 'type' => 'varchar'), 'county' => array('constraint' => 200, 'type' => 'varchar'), 'country_id' => array('constraint' => 11, 'type' => 'int'), 'post_code' => array('constraint' => 10, 'type' => 'varchar'), 'date_of_birth' => array('type' => 'date'), 'tel_home' => array('constraint' => 20, 'type' => 'bigint'), 'tel_work' => array('constraint' => 20, 'type' => 'bigint'), 'tel_mobile' => array('constraint' => 20, 'type' => 'bigint'), 'email' => array('constraint' => 100, 'type' => 'varchar'), 'marital_status_id' => array('constraint' => 3, 'type' => 'tinyint'), 'notes' => array('type' => 'text'), 'status_id' => array('constraint' => 11, 'type' => 'int')), array('client_id'));
     //Adding indexes to id fields
     \DB::query("ALTER TABLE `crm_client_partner_details` ENGINE = MYISAM")->execute();
     \DB::query("ALTER TABLE `crm_client_partner_details` ADD INDEX ( `tel_home` )")->execute();
     \DB::query("ALTER TABLE `crm_client_partner_details` ADD INDEX ( `status_id` )")->execute();
     \DB::query("ALTER TABLE `crm_client_partner_details` ADD FULLTEXT (`forename`)")->execute();
     \DB::query("ALTER TABLE `crm_client_partner_details` ADD FULLTEXT (`surname`)")->execute();
     \DB::query("ALTER TABLE `crm_client_partner_details` ADD FULLTEXT (`post_code`)")->execute();
 }
示例#27
0
 function up()
 {
     \DBUtil::create_table('manifests', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'created_by' => array('type' => 'int', 'constraint' => 11, 'null' => true), 'temporal_start' => array('type' => 'datetime'), 'temporal_end' => array('type' => 'datetime'), 'departure_aerodrome_id' => array('type' => 'int', 'constraint' => 11), 'arrival_aerodrome_id' => array('type' => 'int', 'constraint' => 11), 'flight_record_id' => array('type' => 'int', 'constraint' => 11), 'date' => array('type' => 'datetime')), array('id', 'temporal_start', 'temporal_end'));
     \DBUtil::create_table('manifest_datas', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'created_by' => array('type' => 'int', 'constraint' => 11, 'null' => true), 'temporal_start' => array('type' => 'datetime'), 'temporal_end' => array('type' => 'datetime'), 'aircraft_arm_id' => array('type' => 'int', 'constraint' => 11), 'manifest_id' => array('type' => 'int', 'constraint' => 11), 'value' => array('type' => 'decimal', 'constraint' => [12, 2])), array('id', 'temporal_start', 'temporal_end'));
     \DBUtil::create_table('aerodromes', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'deleted_at' => array('type' => 'datetime', 'null' => true), 'code' => array('type' => 'varchar', 'constraint' => 10), 'name' => array('type' => 'varchar', 'constraint' => 255)), array('id'));
     \DBUtil::create_table('aircraft_arms', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'created_by' => array('type' => 'int', 'constraint' => 11, 'null' => true), 'temporal_start' => array('type' => 'datetime'), 'temporal_end' => array('type' => 'datetime'), 'aircraft_id' => array('type' => 'int', 'constraint' => 11), 'name' => array('type' => 'varchar', 'constraint' => 255), 'position' => array('type' => 'decimal', 'constraint' => [12, 2]), 'value' => array('type' => 'decimal', 'constraint' => [12, 2]), 'type' => array('type' => 'enum', 'constraint' => ['arm', 'maxweight', 'fuelmoment'])), array('id', 'temporal_start', 'temporal_end'));
     \DBUtil::create_table('flight_records', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'created_by' => array('type' => 'int', 'constraint' => 11, 'null' => true), 'temporal_start' => array('type' => 'datetime'), 'temporal_end' => array('type' => 'datetime'), 'aircraft_id' => array('type' => 'int', 'constraint' => 11)), array('id', 'temporal_start', 'temporal_end'));
     \DBUtil::create_table('people', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'created_by' => array('type' => 'int', 'constraint' => 11, 'null' => true), 'temporal_start' => array('type' => 'datetime'), 'temporal_end' => array('type' => 'datetime'), 'first_name' => array('type' => 'varchar', 'constraint' => 255), 'last_name' => array('type' => 'varchar', 'constraint' => 255), 'nhi' => array('type' => 'int', 'constraint' => 11, 'null' => true), 'acc' => array('type' => 'int', 'constraint' => 11, 'null' => true), 'dob' => array('type' => 'datetime', 'null' => true), 'weight' => array('type' => 'decimal', 'constraint' => [6, 2]), 'weight_updated' => array('type' => 'datetime', 'null' => true)), array('id', 'temporal_start', 'temporal_end'));
     \DBUtil::create_table('aircrafts', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'created_by' => array('type' => 'int', 'constraint' => 11, 'null' => true), 'temporal_start' => array('type' => 'datetime'), 'temporal_end' => array('type' => 'datetime'), 'name' => array('type' => 'varchar', 'constraint' => 255), 'description' => array('type' => 'blob'), 'basic_empty_weight' => array('type' => 'decimal', 'constraint' => [12, 2]), 'cg_position' => array('type' => 'decimal', 'constraint' => [12, 2]), 'mzfw' => array('type' => 'decimal', 'constraint' => [12, 2]), 'max_ramp_weight' => array('type' => 'decimal', 'constraint' => [12, 2]), 'mctow' => array('type' => 'decimal', 'constraint' => [12, 2]), 'mlw' => array('type' => 'decimal', 'constraint' => [12, 2])), array('id', 'temporal_start', 'temporal_end'));
     \DBUtil::create_table('manifest_people', array('id' => array('type' => 'int', 'constraint' => 11, 'auto_increment' => true), 'created_by' => array('type' => 'int', 'constraint' => 11, 'null' => true), 'temporal_start' => array('type' => 'datetime'), 'temporal_end' => array('type' => 'datetime'), 'person_id' => array('type' => 'int', 'constraint' => 11), 'manifest_id' => array('type' => 'int', 'constraint' => 11)), array('id', 'temporal_start', 'temporal_end'));
 }
示例#28
0
	public function up()
	{
		\DBUtil::create_table('sms_logs', array(
			'id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true),
			'user_id' => array('constraint' => 11, 'type' => 'int'),
			'to' => array('constraint' => 15, 'type' => 'bigint'),
			'from' => array('constraint' => 255, 'type' => 'varchar'),
			'body' => array('type' => 'text'),
			'created_at' => array('constraint' => 11, 'type' => 'int', 'null' => true),
			'updated_at' => array('constraint' => 11, 'type' => 'int', 'null' => true),

		), array('id'));
	}
 public function up()
 {
     // -- [ Scripts Table ]
     // --------------------
     \DBUtil::create_table('scripts', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'script_type_id' => array('constraint' => 11, 'type' => 'int'), 'name' => array('constraint' => 200, 'type' => 'varchar'), 'description' => array('constraint' => 200, 'type' => 'varchar'), 'script_text' => array('type' => 'longtext'), 'active' => array('constraint' => "'yes','no'", 'type' => 'enum', 'default' => 'yes')), array('id'));
     // -- [ Script Type ]
     // ------------------
     \DBUtil::create_table('type_scripts', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'description' => array('constraint' => 100, 'type' => 'varchar')), array('id'));
     // -- [ Script Type Defaults]
     // --------------------------
     \DB::insert('type_scripts')->set(array('description' => 'Tele Sales'))->execute();
     \DB::insert('type_scripts')->set(array('description' => 'Consolidation'))->execute();
 }
 public function up()
 {
     // -- [ Scripts Form Products Table ]
     // ----------------------------------
     \DBUtil::create_table('scripts_forms_products', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'name' => array('constraint' => 200, 'type' => 'varchar'), 'description' => array('type' => 'text')), array('id'));
     // -- [ Scripts Forms Questions Products Table ]
     // --------------------
     \DBUtil::create_table('scripts_forms_questions_products', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'question_id' => array('constraint' => 11, 'type' => 'int'), 'product_id' => array('constraint' => 11, 'type' => 'int'), 'positive_value' => array('constraint' => 100, 'type' => 'varchar'), 'negative_value' => array('constraint' => 100, 'type' => 'varchar'), 'weight' => array('constraint' => 11, 'type' => 'int'), 'priority' => array('constraint' => 11, 'type' => 'int')), array('id'));
     // -- [ Scripts Forms Questions Products Table ]
     // --------------------
     \DBUtil::create_table('scripts_forms_responses_products', array('id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true), 'response_log_id' => array('constraint' => 11, 'type' => 'int'), 'product_id' => array('constraint' => 11, 'type' => 'int'), 'callback' => array('constraint' => '"yes","no"', 'type' => 'enum', 'default' => 'no')), array('id'));
     \DB::query("ALTER TABLE  `scripts_forms` ADD  `rebuttal_script` VARCHAR( 250 ) NOT NULL AFTER  `repeat`")->execute();
 }