Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SQL/Archive/27.0/2024-12-18-Login-Statistics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ ALTER TABLE dataquery_study_queries_rel
MODIFY COLUMN PinType enum('topquery','dashboard', 'loginpage') DEFAULT NULL;

ALTER TABLE Project
ADD COLUMN showSummaryOnLogin BOOLEAN DEFAULT TRUE;
ADD COLUMN showSummaryOnLogin BOOLEAN DEFAULT TRUE;
11 changes: 11 additions & 0 deletions SQL/Archive/27.0/2025-11-11-login-statistics-rename.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-- Step 1: Try renaming (ignore error if old table doesn’t exist)
RENAME TABLE Login_Summary_Statistics TO login_summary_statistics;

-- Step 2: Create if not already there
CREATE TABLE IF NOT EXISTS login_summary_statistics (
Title VARCHAR(255),
Project VARCHAR(255),
Value INT,
QueryOrder INT,
PRIMARY KEY (Title, Project)
);
3 changes: 2 additions & 1 deletion SQL/Release_patches/26.0_To_27.0_upgrade.sql
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@ INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType,
COALESCE(MAX(child_config.OrderNumber), 0) +1
FROM ConfigSettings parent_config
LEFT JOIN ConfigSettings child_config ON (parent_config.ID = child_config.Parent)
WHERE parent_config.Name = 'redcap';CREATE TABLE Login_Summary_Statistics (
WHERE parent_config.Name = 'redcap';
CREATE TABLE login_summary_statistics (
Title VARCHAR(255),
Project VARCHAR(255),
Value INT,
Expand Down
4 changes: 2 additions & 2 deletions tools/update_login_summary_statistics.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php declare(strict_types=1);

/**
* This script updates the Login Summary Statistics table in the database
* This script updates the login_summary_statistics table in the database
* based on the queries that are pinned to the login page in the dataquery module,
* and on the SQL queries in the project/tools/Login_Summary_Statistics folder,
* or if that does not exist, the SQL/Login_Summary_Statistics folder.
Expand Down Expand Up @@ -164,4 +164,4 @@
]
);
}
}
}
Loading