kopia lustrzana https://github.com/magicbug/Cloudlog
new MigrationVersion Model
rodzic
2bab8a9633
commit
8e3f2e8d6e
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
class MigrationVersion extends CI_Model {
|
||||||
|
|
||||||
|
function getMigrationVersion() {
|
||||||
|
$this->db->select_max('version');
|
||||||
|
$query = $this->db->get('migrations');
|
||||||
|
$migration_version = $query->row();
|
||||||
|
|
||||||
|
if ($query->num_rows() == 1) {
|
||||||
|
$migration_version = $query->row()->version;
|
||||||
|
return $migration_version;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
Ładowanie…
Reference in New Issue