The csv can be imported by using /index.php/lotw/load_users need to impliment frontend next
		
			
				
	
	
		
			33 行
		
	
	
		
			无行尾
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			33 行
		
	
	
		
			无行尾
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| defined('BASEPATH') OR exit('No direct script access allowed');
 | |
| 
 | |
| class Migration_lotwusers extends CI_Migration {
 | |
| 
 | |
|         public function up()
 | |
|         {
 | |
|                 $this->dbforge->add_field(array(
 | |
|                         'id' => array(
 | |
|                                 'type' => 'INT',
 | |
|                                 'constraint' => 5,
 | |
|                                 'unsigned' => TRUE,
 | |
|                                 'auto_increment' => TRUE
 | |
|                         ),
 | |
|                         'callsign' => array(
 | |
|                                 'type' => 'VARCHAR',
 | |
|                                 'constraint' => '100',
 | |
|                         ),
 | |
|                         'upload_date' => array(
 | |
|                                 'type' => 'datetime',
 | |
|                                 'null' => TRUE,
 | |
|                         ),
 | |
|                 ));
 | |
|                 $this->dbforge->add_key('id', TRUE);
 | |
|                 $this->dbforge->create_table('lotw_userlist');
 | |
|         }
 | |
| 
 | |
|         public function down()
 | |
|         {
 | |
|                 $this->dbforge->drop_table('lotw_userlist');
 | |
|         }
 | |
| } |