Add DB migration
这个提交包含在:
		
							父节点
							
								
									995e89e444
								
							
						
					
					
						当前提交
						5649e17bcf
					
				
					共有  1 个文件被更改,包括 28 次插入 和 0 次删除
				
			
		|  | @ -0,0 +1,28 @@ | ||||||
|  | <?php | ||||||
|  | 
 | ||||||
|  | defined('BASEPATH') OR exit('No direct script access allowed'); | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * Class Migration_amsat_status_upload_option | ||||||
|  |  * | ||||||
|  |  * Creates a boolean column with option to allow for activating uploading | ||||||
|  |  * a status info to https://amsat.org/status | ||||||
|  |  */ | ||||||
|  | 
 | ||||||
|  | class Migration_amsat_status_upload_option extends CI_Migration { | ||||||
|  | 
 | ||||||
|  |         public function up() | ||||||
|  |         { | ||||||
|  |                 if (!$this->db->field_exists('user_amsat_status_upload', 'users')) { | ||||||
|  |                         $fields = array( | ||||||
|  |                                 'user_amsat_status_upload BOOLEAN DEFAULT FALSE', | ||||||
|  |                         ); | ||||||
|  |                         $this->dbforge->add_column('users', $fields, 'user_column5'); | ||||||
|  |                 } | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public function down() | ||||||
|  |         { | ||||||
|  |                 $this->dbforge->drop_column('users', 'user_amsat_status_upload'); | ||||||
|  |         } | ||||||
|  | } | ||||||
		正在加载…
	
		在新工单中引用