Created
November 18, 2011 16:16
-
-
Save DominicImhof/1376911 to your computer and use it in GitHub Desktop.
CodeIgniter Automigrate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('BASEPATH') OR exit('No direct script access allowed'); | |
class Automigrate { | |
private $_ci = null; | |
public function __construct() | |
{ | |
$this->_ci =& get_instance(); | |
$this->_ci->config->load('migration'); | |
$enabled = $this->_ci->config->item('migration_enabled'); | |
if($enabled === TRUE) { | |
$this->_ci->load->library('migration'); | |
$this->_ci->migration->current(); | |
} | |
} | |
} | |
/* End of file automigrate.php */ | |
/* Location: ./application/libraries/automigrate.php */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this class to autoload.php