Added Migscript
这个提交包含在:
		
							父节点
							
								
									f5313eca63
								
							
						
					
					
						当前提交
						40218dc8e1
					
				
					共有  1 个文件被更改,包括 24 次插入 和 0 次删除
				
			
		|  | @ -0,0 +1,24 @@ | ||||||
|  | <?php | ||||||
|  | defined('BASEPATH') or exit('No direct script access allowed'); | ||||||
|  | 
 | ||||||
|  | class Migration_add_qrz_down extends CI_Migration | ||||||
|  | { | ||||||
|  | 	public function up() { | ||||||
|  |                 if (!$this->db->field_exists('COL_QRZCOM_QSO_DOWNLOAD_STATUS', $this->config->item('table_name'))) { | ||||||
|  |                         $fields = array( | ||||||
|  |                                 'COL_QRZCOM_QSO_DOWNLOAD_DATE DATETIME NULL DEFAULT NULL', | ||||||
|  |                                 'COL_QRZCOM_QSO_DOWNLOAD_STATUS VARCHAR(10) DEFAULT NULL', | ||||||
|  |                         ); | ||||||
|  |                         $this->dbforge->add_column($this->config->item('table_name'), $fields, 'COL_VUCC_GRIDS'); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public function down() { | ||||||
|  |                 if ($this->db->field_exists('COL_QRZCOM_QSO_DOWNLOAD_STATUS', $this->config->item('table_name'))) { | ||||||
|  |                         $this->dbforge->drop_column($this->config->item('table_name'), 'COL_QRZCOM_QSO_DOWNLOAD_STATUS'); | ||||||
|  |                 } | ||||||
|  |                 if ($this->db->field_exists('COL_QRZCOM_QSO_DOWNLOAD_DATE', $this->config->item('table_name'))) { | ||||||
|  |                         $this->dbforge->drop_column($this->config->item('table_name'), 'COL_QRZCOM_QSO_DOWNLOAD_DATE'); | ||||||
|  |                 } | ||||||
|  | 	} | ||||||
|  | } | ||||||
		正在加载…
	
		在新工单中引用