Rough in User_Preferences table in db

pull/3680/head
Isaac Connor 2023-03-20 13:03:55 -04:00
parent cd167d8aec
commit 5d63d4f375
4 changed files with 19 additions and 0 deletions

View File

@ -5,6 +5,7 @@ configure_file(zm_create.sql.in "${CMAKE_CURRENT_BINARY_DIR}/zm_create.sql" @ONL
configure_file(zm_update-1.31.30.sql.in "${CMAKE_CURRENT_BINARY_DIR}/zm_update-1.31.30.sql" @ONLY)
configure_file(zm_update-1.35.24.sql.in "${CMAKE_CURRENT_BINARY_DIR}/zm_update-1.35.24.sql" @ONLY)
configure_file(zm_update-1.37.4.sql.in "${CMAKE_CURRENT_BINARY_DIR}/zm_update-1.37.4.sql" @ONLY)
configure_file(zm_update-1.37.38.sql.in "${CMAKE_CURRENT_BINARY_DIR}/zm_update-1.37.38.sql" @ONLY)
# Glob all database upgrade scripts
file(GLOB dbfileslist RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "zm_update-*.sql")

15
db/User_Preferences.sql Normal file
View File

@ -0,0 +1,15 @@
--
-- Table structure for table `Users_Preferences`
--
DROP TABLE IF EXISTS `User_Preferences`;
CREATE TABLE `User_Preferencess` (
`Id` int(10) unsigned NOT NULL auto_increment,
`UserId` int(10) unsigned NOT NULL,
FOREIGN KEY (UserId) REFERENCES Users(Id),
`Name` varchar(64),
`Value` TEXT,
PRIMARY KEY (Id)
);
CREATE INDEX User_Preferences_UserID_idx on User_Preferences (`UserId`);

View File

@ -785,6 +785,8 @@ CREATE TABLE `Users` (
UNIQUE KEY `UC_Username` (`Username`)
) ENGINE=@ZM_MYSQL_ENGINE@;
source @PKGDATADIR@/db/User_Preferences.sql
--
-- Table structure for table `ZonePresets`
--

View File

@ -0,0 +1 @@
source @PKGDATADIR@/db/User_Preferences.sql