mirror of https://github.com/itflow-org/itflow
Updated DB Structure in Documentents to allow for created, updated by and document_description
This commit is contained in:
parent
c051afd52c
commit
26196a18e7
|
|
@ -1348,11 +1348,21 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
|
|||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.4'");
|
||||
}
|
||||
|
||||
//if (CURRENT_DATABASE_VERSION == '0.8.4') {
|
||||
if (CURRENT_DATABASE_VERSION == '0.8.4') {
|
||||
//Insert queries here required to update to DB version 0.8.5
|
||||
mysqli_query($mysqli, "ALTER TABLE `documents` ADD `document_description` TEXT DEFAULT NULL AFTER `document_name`");
|
||||
mysqli_query($mysqli, "ALTER TABLE `documents` ADD `document_created_by` INT(11) NOT NULL DEFAULT 0 AFTER `document_folder_id`");
|
||||
mysqli_query($mysqli, "ALTER TABLE `documents` ADD `document_updated_by` INT(11) NOT NULL DEFAULT 0 AFTER `document_created_by`");
|
||||
|
||||
// Then, update the database to the next sequential version
|
||||
//mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.5'");
|
||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.5'");
|
||||
}
|
||||
|
||||
//if (CURRENT_DATABASE_VERSION == '0.8.5') {
|
||||
//Insert queries here required to update to DB version 0.8.6
|
||||
|
||||
// Then, update the database to the next sequential version
|
||||
//mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.6'");
|
||||
//}
|
||||
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@
|
|||
* It is used in conjunction with database_updates.php
|
||||
*/
|
||||
|
||||
DEFINE("LATEST_DATABASE_VERSION", "0.8.4");
|
||||
DEFINE("LATEST_DATABASE_VERSION", "0.8.5");
|
||||
|
|
|
|||
5
db.sql
5
db.sql
|
|
@ -450,6 +450,7 @@ DROP TABLE IF EXISTS `documents`;
|
|||
CREATE TABLE `documents` (
|
||||
`document_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`document_name` varchar(200) NOT NULL,
|
||||
`document_description` text DEFAULT NULL,
|
||||
`document_content` longtext NOT NULL,
|
||||
`document_content_raw` longtext NOT NULL,
|
||||
`document_parent` int(11) NOT NULL DEFAULT 0,
|
||||
|
|
@ -459,6 +460,8 @@ CREATE TABLE `documents` (
|
|||
`document_accessed_at` datetime DEFAULT NULL,
|
||||
`document_template` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`document_folder_id` int(11) NOT NULL DEFAULT 0,
|
||||
`document_created_by` int(11) NOT NULL DEFAULT 0,
|
||||
`document_updated_by` int(11) NOT NULL DEFAULT 0,
|
||||
`document_client_id` int(11) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`document_id`),
|
||||
FULLTEXT KEY `document_content_raw` (`document_content_raw`)
|
||||
|
|
@ -1715,4 +1718,4 @@ CREATE TABLE `vendors` (
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2023-09-23 15:54:04
|
||||
-- Dump completed on 2023-09-24 20:31:22
|
||||
|
|
|
|||
Loading…
Reference in New Issue