mirror of https://github.com/itflow-org/itflow
Added Connected Asset Interface ID to asset interface table to eventual link to anothr assets interface/port
This commit is contained in:
parent
1c971ca88c
commit
e4a4687e8c
|
|
@ -2404,18 +2404,26 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
|
|||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.7.5'");
|
||||
}
|
||||
|
||||
if (CURRENT_DATABASE_VERSION == '1.7.5') {
|
||||
mysqli_query($mysqli, "CREATE TABLE `client_stripe` (`client_id` INT(11) NOT NULL, `stripe_id` VARCHAR(255) NOT NULL, `stripe_pm` varchar(255) NULL) ENGINE = InnoDB CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci; ");
|
||||
if (CURRENT_DATABASE_VERSION == '1.7.5') {
|
||||
mysqli_query($mysqli, "CREATE TABLE `client_stripe` (`client_id` INT(11) NOT NULL, `stripe_id` VARCHAR(255) NOT NULL, `stripe_pm` varchar(255) NULL) ENGINE = InnoDB CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci; ");
|
||||
|
||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.7.6'");
|
||||
}
|
||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.7.6'");
|
||||
}
|
||||
|
||||
// if (CURRENT_DATABASE_VERSION == '1.7.6') {
|
||||
// // Insert queries here required to update to DB version 1.7.7
|
||||
if (CURRENT_DATABASE_VERSION == '1.7.6') {
|
||||
// Create a field to show connected interfae of a foreign asset
|
||||
mysqli_query($mysqli, "ALTER TABLE `asset_interfaces` ADD `interface_connected_asset_interface` INT(11) NOT NULL DEFAULT 0 AFTER `interface_network_id`");
|
||||
|
||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.7.7'");
|
||||
}
|
||||
|
||||
// if (CURRENT_DATABASE_VERSION == '1.7.7') {
|
||||
// // Insert queries here required to update to DB version 1.7.8
|
||||
// // Then, update the database to the next sequential version
|
||||
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.7.7'");
|
||||
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.7.8'");
|
||||
// }
|
||||
|
||||
} else {
|
||||
// Up-to-date
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@
|
|||
* It is used in conjunction with database_updates.php
|
||||
*/
|
||||
|
||||
DEFINE("LATEST_DATABASE_VERSION", "1.7.6");
|
||||
DEFINE("LATEST_DATABASE_VERSION", "1.7.7");
|
||||
|
|
|
|||
10
db.sql
10
db.sql
|
|
@ -155,6 +155,7 @@ CREATE TABLE `asset_interfaces` (
|
|||
`interface_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
||||
`interface_archived_at` datetime DEFAULT NULL,
|
||||
`interface_network_id` int(11) DEFAULT NULL,
|
||||
`interface_connected_asset_interface` int(11) NOT NULL DEFAULT 0,
|
||||
`interface_asset_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`interface_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
|
@ -347,11 +348,14 @@ CREATE TABLE `client_notes` (
|
|||
--
|
||||
|
||||
DROP TABLE IF EXISTS `client_stripe`;
|
||||
CREATE TABLE IF NOT EXISTS `client_stripe` (
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `client_stripe` (
|
||||
`client_id` int(11) NOT NULL,
|
||||
`stripe_id` varchar(255) NOT NULL,
|
||||
`stripe_pm` varchar(255) NULL
|
||||
`stripe_pm` varchar(255) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `client_tags`
|
||||
|
|
@ -2298,4 +2302,4 @@ CREATE TABLE `vendors` (
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2024-12-21 20:24:14
|
||||
-- Dump completed on 2025-01-14 23:47:59
|
||||
|
|
|
|||
Loading…
Reference in New Issue