You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							37 lines
						
					
					
						
							649 B
						
					
					
				
			
		
		
	
	
							37 lines
						
					
					
						
							649 B
						
					
					
				| <?php | |
| defined('BASEPATH') OR exit('No direct script access allowed'); | |
|  | |
| /** | |
| * Migrate to next database release | |
| */ | |
| class Migrate extends CI_Controller | |
| { | |
| 	 | |
| 	public function __construct() | |
| 	{ | |
| 		parent::__construct(); | |
| 		$this->load->library('migration'); | |
| 	} | |
| 	 | |
| 	public function version($id = NULL) | |
| 	{ | |
| 		if ($this->migration->version($id) === FALSE) | |
| 		{ | |
| 			show_error($this->migration->error_string()); | |
| 		} else { | |
| 			echo "Database moved to: ".$id; | |
| 		} | |
| 	} | |
| 	 | |
| 	public function latest() | |
| 	{ | |
| 		if ($this->migration->latest() === FALSE) | |
| 		{ | |
| 			show_error($this->migration->error_string()); | |
| 		} else { | |
| 			echo "Database updated or update not needed."; | |
| 		} | |
| 	} | |
| } | |
|  | |
| ?>
 |