diff --git a/mxq_group.c b/mxq_group.c index d24ca88e..d34d5feb 100644 --- a/mxq_group.c +++ b/mxq_group.c @@ -12,11 +12,12 @@ #include "mxq_mysql.h" #include "mx_mysql.h" -#define GROUP_FIELDS_CNT 24 +#define GROUP_FIELDS_CNT 25 #define GROUP_FIELDS \ " group_id," \ " group_name," \ " group_status," \ + " group_flags," \ " group_priority," \ " user_uid," \ " user_name," \ @@ -101,6 +102,7 @@ static int bind_result_group_fields(struct mx_mysql_bind *result, struct mxq_gro res += mx_mysql_bind_var(result, idx++, uint64, &(g->group_id)); res += mx_mysql_bind_var(result, idx++, string, &(g->group_name)); res += mx_mysql_bind_var(result, idx++, uint8, &(g->group_status)); + res += mx_mysql_bind_var(result, idx++, uint64, &(g->group_flags)); res += mx_mysql_bind_var(result, idx++, uint16, &(g->group_priority)); res += mx_mysql_bind_var(result, idx++, uint32, &(g->user_uid)); diff --git a/mxq_group.h b/mxq_group.h index ea4b8e97..048fdf02 100644 --- a/mxq_group.h +++ b/mxq_group.h @@ -13,6 +13,7 @@ struct mxq_group { unsigned long _group_name_length; uint8_t group_status; + uint64_t group_flags; uint16_t group_priority; uint32_t user_uid; diff --git a/mysql/create_tables b/mysql/create_tables index 5cb8c04c..3ec57d02 100644 --- a/mysql/create_tables +++ b/mysql/create_tables @@ -1,4 +1,8 @@ +ALTER TABLE mxq_group + ADD COLUMN group_flags INT8 UNSIGNED NOT NULL DEFAULT 0 + AFTER group_status; + ALTER TABLE mxq_group ADD COLUMN group_jobs_inq INT8 UNSIGNED NOT NULL DEFAULT 0 AFTER group_jobs; @@ -40,6 +44,7 @@ CREATE TABLE IF NOT EXISTS mxq_group ( group_id INT8 UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, group_name VARCHAR(511) NOT NULL DEFAULT 'default', group_status INT1 UNSIGNED NOT NULL DEFAULT 0, + group_flags INT8 UNSIGNED NOT NULL DEFAULT 0, group_priority INT2 UNSIGNED NOT NULL DEFAULT 127, user_uid INT4 UNSIGNED NOT NULL,