mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 10:54:52 +00:00
DB Structure Update This is the beginnings to move primary_contact and primary_location fields out of the clients table and into their respectable table. Created the fields in contacts and locations, next is to write SQL query to migrate and then update pieces of the codes in the App
This commit is contained in:
@@ -1097,11 +1097,18 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
|
||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.5.8'");
|
||||
}
|
||||
|
||||
//if (CURRENT_DATABASE_VERSION == '0.5.8') {
|
||||
//Insert queries here required to update to DB version 0.5.9
|
||||
if (CURRENT_DATABASE_VERSION == '0.5.8') {
|
||||
mysqli_query($mysqli, "ALTER TABLE `contacts` ADD `contact_primary` TINYINT(1) NOT NULL DEFAULT 0 AFTER `contact_token_expire`");
|
||||
mysqli_query($mysqli, "ALTER TABLE `locations` ADD `location_primary` TINYINT(1) NOT NULL DEFAULT 0 AFTER `location_photo`");
|
||||
|
||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.5.9'");
|
||||
}
|
||||
|
||||
//if (CURRENT_DATABASE_VERSION == '0.5.9') {
|
||||
//Insert queries here required to update to DB version 0.6.0
|
||||
|
||||
// Then, update the database to the next sequential version
|
||||
//mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.5.9'");
|
||||
//mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.0'");
|
||||
//}
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user