kopia lustrzana https://github.com/magicbug/Cloudlog
Only create the fields in db if they arent there
rodzic
99b7290412
commit
e8be6f8620
|
@ -10,7 +10,9 @@ class Migration_add_userid_to_station_profiles extends CI_Migration {
|
|||
'user_id BIGINT(20) DEFAULT NULL',
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('station_profile', $fields);
|
||||
if (!$this->db->field_exists('user_id', 'station_profile')) {
|
||||
$this->dbforge->add_column('station_profile', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
|
|
|
@ -15,7 +15,9 @@ class Migration_add_active_station_logbook_to_user_table extends CI_Migration {
|
|||
'active_station_logbook int(11)',
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
if (!$this->db->field_exists('active_station_logbook', 'users')) {
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
|
|
Ładowanie…
Reference in New Issue