mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Added privilege level start/end columns (#2328)
* Added privilege level start/end columns Added 2 new columns to the users table to indicate when a users privilege level date / time was recognised and when the privilege level should end. * Updated database header Always forget about the database header file... * Added priv level maintenance script Added a bash maintenance script that can be run on a scheduled basis that will demote privileged users that have the end times on the accounts that are prior to the date/time the script is executed. * Added donations table Added donations table to db for tracking user donations
This commit is contained in:
parent
62dc6dcb86
commit
f7c8651d51
4 changed files with 44 additions and 2 deletions
8
servatrice/scripts/linux/maint_privlevel
Normal file
8
servatrice/scripts/linux/maint_privlevel
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# SCHEDULE WITH CRONTAB TO RUN ON A REGULAR BASIS
|
||||
|
||||
DBNAME="servatrice" #set this to the database name used
|
||||
TABLEPREFIX="cockatrice" #set this to the prefix used for the table names in the database (do not inclue the _)
|
||||
SQLCONFFILE="./mysql.cnf" #set this to the path that contains the mysql.cnf file
|
||||
mysql --defaults-file=$SQLCONFFILE -h localhost -e "update ""$DBNAME"".""$TABLEPREFIX""_users set privlevel = 'NONE' where privelevel != 'NONE" AND privlevelEndDate < NOW()"
|
||||
Loading…
Add table
Add a link
Reference in a new issue