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.
42 lines
1.3 KiB
SQL
Executable File
42 lines
1.3 KiB
SQL
Executable File
-- Vereinfachtes Cleanup-Script für MySQL Keys
|
|
-- Entfernt nur die problematischsten Keys
|
|
|
|
USE trainingsdiary;
|
|
|
|
-- 1. Alle überflüssigen INDEX entfernen (die meisten werden von Sequelize automatisch erstellt)
|
|
-- Diese entfernen die meisten Keys, die das Limit überschreiten
|
|
|
|
-- Member-Tabelle (Hauptproblem)
|
|
DROP INDEX IF EXISTS idx_member_hashed_id ON member;
|
|
DROP INDEX IF EXISTS idx_member_first_name ON member;
|
|
DROP INDEX IF EXISTS idx_member_last_name ON member;
|
|
DROP INDEX IF EXISTS idx_member_birth_date ON member;
|
|
DROP INDEX IF EXISTS idx_member_active ON member;
|
|
DROP INDEX IF EXISTS idx_member_created_at ON member;
|
|
DROP INDEX IF EXISTS idx_member_updated_at ON member;
|
|
|
|
-- User-Tabelle
|
|
DROP INDEX IF EXISTS idx_user_email ON user;
|
|
DROP INDEX IF EXISTS idx_user_created_at ON user;
|
|
DROP INDEX IF EXISTS idx_user_updated_at ON user;
|
|
|
|
-- Clubs-Tabelle
|
|
DROP INDEX IF EXISTS idx_clubs_name ON clubs;
|
|
DROP INDEX IF EXISTS idx_clubs_created_at ON clubs;
|
|
DROP INDEX IF EXISTS idx_clubs_updated_at ON clubs;
|
|
|
|
-- 2. Status anzeigen
|
|
SELECT
|
|
TABLE_NAME,
|
|
COUNT(*) as key_count
|
|
FROM INFORMATION_SCHEMA.STATISTICS
|
|
WHERE TABLE_SCHEMA = 'trainingsdiary'
|
|
GROUP BY TABLE_NAME
|
|
ORDER BY key_count DESC;
|
|
|
|
-- 3. Gesamtanzahl der Keys anzeigen
|
|
SELECT
|
|
COUNT(*) as total_keys
|
|
FROM INFORMATION_SCHEMA.STATISTICS
|
|
WHERE TABLE_SCHEMA = 'trainingsdiary';
|