Moving LoTW config elements to a config table in the database. The config table is created and populated via migration. Removing the config elements from the sample config file.
这个提交包含在:
		
							父节点
							
								
									c614c5a89d
								
							
						
					
					
						当前提交
						f630dde7ce
					
				
					共有  1 个文件被更改,包括 39 次插入 和 0 次删除
				
			
		|  | @ -0,0 +1,39 @@ | |||
| <?php defined('BASEPATH') OR exit('No direct script access allowed'); | ||||
| 
 | ||||
| class Migration_add_config_table extends CI_Migration { | ||||
| 
 | ||||
|         public function up() | ||||
|         { | ||||
| 
 | ||||
|                 $this->dbforge->add_field(array( | ||||
|                         'lotw_download_url' => array( | ||||
|                                 'type' => 'VARCHAR', | ||||
|                                 'constraint' => 255, | ||||
|                         ), | ||||
|                         'lotw_upload_url' => array( | ||||
|                                 'type' => 'VARCHAR', | ||||
|                                 'constraint' => 255, | ||||
|                         ), | ||||
|                        'lotw_rcvd_mark' => array( | ||||
|                                 'type' => 'VARCHAR', | ||||
|                                 'constraint' => 1, | ||||
|                         ), | ||||
|                 )); | ||||
| 				 | ||||
|                 $this->dbforge->create_table('config'); | ||||
| 				 | ||||
| 				$data = array( | ||||
|    					'lotw_download_url' => 'https://p1k.arrl.org/lotwuser/lotwreport.adi', | ||||
|    					'lotw_upload_url' => 'https://p1k.arrl.org/lotwuser/upload', | ||||
|    					'lotw_rcvd_mark' => 'Y' | ||||
| 				); | ||||
| 
 | ||||
| 				$this->db->insert('config', $data);  | ||||
|         } | ||||
| 
 | ||||
|         public function down() | ||||
|         { | ||||
|                 $this->dbforge->drop_table('config'); | ||||
|         } | ||||
| } | ||||
| ?>
 | ||||
		正在加载…
	
		在新工单中引用