Merge pull request #1034 from itflow-org/add-db-docs-client-visible

Docs - DB Structure to hide from client portal
This commit is contained in:
Johnny 2024-09-06 22:08:48 -04:00 committed by GitHub
commit c20f9942f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 5 deletions

View File

@ -2139,7 +2139,7 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
}
if (CURRENT_DATABASE_VERSION == '1.4.6') {
mysqli_query($mysqli, "CREATE TABLE `custom_links` (
mysqli_query($mysqli, "CREATE TABLE `custom_links` (
`custom_link_id` INT(11) NOT NULL AUTO_INCREMENT,
`custom_link_name` VARCHAR(200) NOT NULL,
`custom_link_description` TEXT DEFAULT NULL,
@ -2153,10 +2153,16 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.4.7'");
}
// if (CURRENT_DATABASE_VERSION == '1.4.7') {
// // Insert queries here required to update to DB version 1.4.8
if (CURRENT_DATABASE_VERSION == '1.4.7') {
mysqli_query($mysqli, "ALTER TABLE `documents` ADD `document_client_visible` INT(11) NOT NULL DEFAULT '1' AFTER `document_parent`");
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.4.8'");
}
// if (CURRENT_DATABASE_VERSION == '1.4.8') {
// // Insert queries here required to update to DB version 1.4.9
// // Then, update the database to the next sequential version
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.4.8'");
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.4.9'");
// }
} else {

View File

@ -5,4 +5,4 @@
* It is used in conjunction with database_updates.php
*/
DEFINE("LATEST_DATABASE_VERSION", "1.4.7");
DEFINE("LATEST_DATABASE_VERSION", "1.4.8");

1
db.sql
View File

@ -526,6 +526,7 @@ CREATE TABLE `documents` (
`document_content_raw` longtext NOT NULL,
`document_important` tinyint(1) NOT NULL DEFAULT 0,
`document_parent` int(11) NOT NULL DEFAULT 0,
`document_client_visible` int(11) NOT NULL DEFAULT 1,
`document_created_at` datetime NOT NULL DEFAULT current_timestamp(),
`document_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`document_archived_at` datetime DEFAULT NULL,