kopia lustrzana https://github.com/magicbug/Cloudlog
				
				
				
			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.
							rodzic
							
								
									c614c5a89d
								
							
						
					
					
						commit
						f630dde7ce
					
				| 
						 | 
				
			
			@ -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');
 | 
			
		||||
        }
 | 
			
		||||
}
 | 
			
		||||
?>
 | 
			
		||||
		Ładowanie…
	
		Reference in New Issue