All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 54s
- Changed file permissions from 644 to 755 for various files in the mobile-app and mobile-app_legacy_rn_expo directories, ensuring executable permissions where necessary. - Added a new SQL migration script to the backend to introduce missing columns for club billing and invoice settings in the clubs table, maintaining synchronization with the current Sequelize model.
47 lines
1.2 KiB
SQL
Executable File
47 lines
1.2 KiB
SQL
Executable File
-- Script zum Überprüfen der echten INDEX-Namen
|
|
USE trainingsdiary;
|
|
|
|
-- Alle vorhandenen Tabellen anzeigen
|
|
SELECT '=== VORHANDENE TABELLEN ===' as info;
|
|
SHOW TABLES;
|
|
|
|
-- Alle vorhandenen INDEX und Keys anzeigen (mit echten Namen)
|
|
SELECT '=== ALLE INDEX UND KEYS ===' as info;
|
|
SELECT
|
|
TABLE_NAME,
|
|
INDEX_NAME,
|
|
COLUMN_NAME,
|
|
NON_UNIQUE,
|
|
SEQ_IN_INDEX
|
|
FROM INFORMATION_SCHEMA.STATISTICS
|
|
WHERE TABLE_SCHEMA = 'trainingsdiary'
|
|
ORDER BY TABLE_NAME, INDEX_NAME, SEQ_IN_INDEX;
|
|
|
|
-- Anzahl der Keys pro Tabelle
|
|
SELECT '=== KEYS PRO TABELLE ===' as info;
|
|
SELECT
|
|
TABLE_NAME,
|
|
COUNT(*) as key_count
|
|
FROM INFORMATION_SCHEMA.STATISTICS
|
|
WHERE TABLE_SCHEMA = 'trainingsdiary'
|
|
GROUP BY TABLE_NAME
|
|
ORDER BY key_count DESC;
|
|
|
|
-- Gesamtanzahl der Keys
|
|
SELECT '=== GESAMTANZAHL KEYS ===' as info;
|
|
SELECT
|
|
COUNT(*) as total_keys
|
|
FROM INFORMATION_SCHEMA.STATISTICS
|
|
WHERE TABLE_SCHEMA = 'trainingsdiary';
|
|
|
|
-- Nur die Tabellen mit den meisten Keys anzeigen (Problem-Tabellen)
|
|
SELECT '=== PROBLEM-TABELLEN (MEHR ALS 10 KEYS) ===' as info;
|
|
SELECT
|
|
TABLE_NAME,
|
|
COUNT(*) as key_count
|
|
FROM INFORMATION_SCHEMA.STATISTICS
|
|
WHERE TABLE_SCHEMA = 'trainingsdiary'
|
|
GROUP BY TABLE_NAME
|
|
HAVING COUNT(*) > 10
|
|
ORDER BY key_count DESC;
|