mirror of
https://github.com/itflow-org/itflow
synced 2026-03-19 12:14:50 +00:00
DB Update add user_role_type to differentiate between itflow users, client users and api permissions
This commit is contained in:
@@ -2242,10 +2242,15 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
|
|||||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.4'");
|
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.4'");
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (CURRENT_DATABASE_VERSION == '1.5.4') {
|
if (CURRENT_DATABASE_VERSION == '1.5.4') {
|
||||||
// // Insert queries here required to update to DB version 1.5.5
|
mysqli_query($mysqli, "ALTER TABLE `user_roles` ADD `user_role_type` TINYINT(1) NOT NULL DEFAULT 1 AFTER `user_role_description`");
|
||||||
|
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.5'");
|
||||||
|
}
|
||||||
|
|
||||||
|
// if (CURRENT_DATABASE_VERSION == '1.5.5') {
|
||||||
|
// // Insert queries here required to update to DB version 1.5.6
|
||||||
// // Then, update the database to the next sequential version
|
// // Then, update the database to the next sequential version
|
||||||
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.5'");
|
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.5.6'");
|
||||||
// }
|
// }
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -5,4 +5,4 @@
|
|||||||
* It is used in conjunction with database_updates.php
|
* It is used in conjunction with database_updates.php
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DEFINE("LATEST_DATABASE_VERSION", "1.5.4");
|
DEFINE("LATEST_DATABASE_VERSION", "1.5.5");
|
||||||
|
|||||||
4
db.sql
4
db.sql
@@ -1975,6 +1975,7 @@ CREATE TABLE `user_roles` (
|
|||||||
`user_role_id` int(11) NOT NULL AUTO_INCREMENT,
|
`user_role_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`user_role_name` varchar(200) NOT NULL,
|
`user_role_name` varchar(200) NOT NULL,
|
||||||
`user_role_description` varchar(200) DEFAULT NULL,
|
`user_role_description` varchar(200) DEFAULT NULL,
|
||||||
|
`user_role_type` tinyint(1) NOT NULL DEFAULT 1,
|
||||||
`user_role_is_admin` tinyint(1) NOT NULL DEFAULT 0,
|
`user_role_is_admin` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`user_role_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
`user_role_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||||
`user_role_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
`user_role_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
|
||||||
@@ -2014,6 +2015,7 @@ CREATE TABLE `users` (
|
|||||||
`user_name` varchar(200) NOT NULL,
|
`user_name` varchar(200) NOT NULL,
|
||||||
`user_email` varchar(200) NOT NULL,
|
`user_email` varchar(200) NOT NULL,
|
||||||
`user_password` varchar(200) NOT NULL,
|
`user_password` varchar(200) NOT NULL,
|
||||||
|
`user_type` tinyint(1) NOT NULL DEFAULT 1,
|
||||||
`user_status` tinyint(1) NOT NULL DEFAULT 1,
|
`user_status` tinyint(1) NOT NULL DEFAULT 1,
|
||||||
`user_token` varchar(200) DEFAULT NULL,
|
`user_token` varchar(200) DEFAULT NULL,
|
||||||
`user_avatar` varchar(200) DEFAULT NULL,
|
`user_avatar` varchar(200) DEFAULT NULL,
|
||||||
@@ -2110,4 +2112,4 @@ CREATE TABLE `vendors` (
|
|||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
-- Dump completed on 2024-09-18 18:21:54
|
-- Dump completed on 2024-10-22 14:08:06
|
||||||
|
|||||||
Reference in New Issue
Block a user