Version 20.51.46: Mar 26, 2021 User reports database table renamed.

This commit is contained in:
acanas 2021-03-26 00:03:43 +01:00
parent 60aa976efc
commit 570ac36de1
4 changed files with 17 additions and 11 deletions

View File

@ -1742,9 +1742,9 @@ CREATE TABLE IF NOT EXISTS usr_pending_passwd (
DateAndTime DATETIME NOT NULL,
PRIMARY KEY(UsrCod));
--
-- Table usr_report: stores users' usage reports
-- Table usr_reports: stores users' usage reports
--
CREATE TABLE IF NOT EXISTS usr_report (
CREATE TABLE IF NOT EXISTS usr_reports (
RepCod INT NOT NULL AUTO_INCREMENT,
UsrCod INT NOT NULL,
ReportTimeUTC DATETIME NOT NULL,

View File

@ -600,14 +600,18 @@ TODO: Salvador Romero Cort
TODO: FIX BUG, URGENT! En las fechas como parámetro Dat_WriteParamsIniEndDates(), por ejemplo al cambiar el color de la gráfica de accesos por día y hora, no se respeta la zona horaria.
*/
#define Log_PLATFORM_VERSION "SWAD 20.51.45 (2021-03-25)"
#define Log_PLATFORM_VERSION "SWAD 20.51.46 (2021-03-26)"
#define CSS_FILE "swad20.45.css"
#define JS_FILE "swad20.6.2.js"
/*
TODO: Rename CENTRE to CENTER in help wiki.
TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams
Version 20.51.45: Mar 25, 2021 Project users database table renamed. (308767 lines)
Version 20.51.46: Mar 26, 2021 User reports database table renamed. (308775 lines)
1 change necessary in database:
RENAME TABLE usr_report TO usr_reports;
Version 20.51.45: Mar 25, 2021 Statistics about notifications database table renamed. (308767 lines)
1 change necessary in database:
RENAME TABLE sta_notif TO sta_notifications;

View File

@ -3654,9 +3654,9 @@ mysql> DESCRIBE usr_pending_passwd;
"DateAndTime DATETIME NOT NULL,"
"PRIMARY KEY (UsrCod))");
/***** Table usr_report *****/
/***** Table usr_reports *****/
/*
mysql> DESCRIBE usr_report;
mysql> DESCRIBE usr_reports;
+---------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+----------------+
@ -3670,7 +3670,7 @@ mysql> DESCRIBE usr_report;
+---------------+--------------+------+-----+---------+----------------+
7 rows in set (0,00 sec)
*/
DB_CreateTable ("CREATE TABLE IF NOT EXISTS usr_report ("
DB_CreateTable ("CREATE TABLE IF NOT EXISTS usr_reports ("
"RepCod INT NOT NULL AUTO_INCREMENT,"
"UsrCod INT NOT NULL,"
"ReportTimeUTC DATETIME NOT NULL,"

View File

@ -421,7 +421,7 @@ static void Rep_CreateNewReportEntryIntoDB (const struct Rep_Report *Report)
{
/***** Insert a new user's usage report into database *****/
DB_QueryINSERT ("can not create new user's usage report",
"INSERT INTO usr_report"
"INSERT INTO usr_reports"
" (UsrCod,ReportTimeUTC,"
"UniqueDirL,UniqueDirR,Filename,Permalink)"
" VALUES"
@ -1424,8 +1424,9 @@ static void Rep_RemoveUsrReportsFiles (long UsrCod)
/***** Get directories for the reports *****/
NumReports =
(unsigned) DB_QuerySELECT (&mysql_res,"can not get user's usage reports",
"SELECT UniqueDirL,UniqueDirR"
" FROM usr_report"
"SELECT UniqueDirL," // row[0]
"UniqueDirR" // row[1]
" FROM usr_reports"
" WHERE UsrCod=%ld",
UsrCod);
@ -1455,6 +1456,7 @@ static void Rep_RemoveUsrReportsFromDB (long UsrCod)
{
/***** Insert a new user's usage report into database *****/
DB_QueryDELETE ("can not remove user's usage reports",
"DELETE FROM usr_report WHERE UsrCod=%ld",
"DELETE FROM usr_reports"
" WHERE UsrCod=%ld",
UsrCod);
}