diff --git a/application/migrations/073_add_userid_to_station_profiles.php b/application/migrations/073_add_userid_to_station_profiles.php index fd97b925..7a2c5161 100644 --- a/application/migrations/073_add_userid_to_station_profiles.php +++ b/application/migrations/073_add_userid_to_station_profiles.php @@ -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() diff --git a/application/migrations/074_add_active_station_logbook_to_user_table.php b/application/migrations/074_add_active_station_logbook_to_user_table.php index 61bc1718..89967405 100644 --- a/application/migrations/074_add_active_station_logbook_to_user_table.php +++ b/application/migrations/074_add_active_station_logbook_to_user_table.php @@ -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()