HEX
Server: Apache
System: Linux www3.pit.tblive.com 5.14.0-687.38.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 12 17:19:12 EDT 2026 x86_64
User: awaldron (1020)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/awaldron/public_html/archive/ras/application/migrations/001_Create_accounts.php
<?php defined('BASEPATH') OR exit('No direct script access allowed');

class Migration_Create_accounts extends	CI_Migration {
	
	function up() 
	{	
		if ( ! $this->db->table_exists('accounts'))
		{
			// Setup Keys
			$this->dbforge->add_key('id', TRUE);
			
			$this->dbforge->add_field(array(
				'id' => array('type' => 'INT', 'constraint' => 5, 'unsigned' => TRUE, 'auto_increment' => TRUE),
				'company_name' => array('type' => 'VARCHAR', 'constraint' => '200', 'null' => FALSE),
				'first_name' => array('type' => 'VARCHAR', 'constraint' => '200', 'null' => FALSE),
				'last_name' => array('type' => 'VARCHAR', 'constraint' => '200', 'null' => FALSE),
				'phone' => array('type' => 'TEXT', 'null' => FALSE),
				'email' => array('type' => 'TEXT', 'null' => FALSE),
				'address' => array('type' => 'TEXT', 'null' => FALSE),
				'Last_Update' => array('type' => 'DATETIME', 'null' => FALSE)
			));
			
			$this->dbforge->add_field("Created_At TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP");
			$this->dbforge->create_table('accounts', TRUE);
		}
	}

	function down() 
	{
		$this->dbforge->drop_table('accounts');
	}
}