Skip to content

Docker-Image funktioniert nicht #12

@Bloodboy1986

Description

@Bloodboy1986

Hallo Sleepwalker86,

ich versuche deine Haushaltsbuch-App per Docker zu starten, erhalte allerdings folgenden Fehler im Container:

Host: Ubuntu-Server 24.04.3
Docker: Docker version 29.1.5, build 0e6fee6
Docker-compose: docker-compose version 1.29.2, build unknown

finanzapp  | 🚀 Starte Finanzapp Container...
finanzapp  | ⏳ Warte auf MySQL Datenbank (interne DB)...
finanzapp  | ✅ MySQL ist bereit
finanzapp  | ⚙️  Erstelle/aktualisiere config.json...
finanzapp  | ✅ config.json aktualisiert
finanzapp  | 🗄️  Initialisiere Datenbank...
finanzapp  | 🔄 Führe Datenbank-Migrationen aus...
finanzapp  | 🔄 Prüfe Datenbank-Migrationen...
finanzapp  |    Bereits angewendet: 0 Migration(en)
finanzapp  |    4 neue Migration(en) gefunden
finanzapp  | 📝 Wende Migration 001 an: 001_initial_schema.sql
finanzapp  |    Gefundene Statements: 5
finanzapp  |    Statement 1: CREATE TABLE IF NOT EXISTS schema_migrations ( version VARCHAR(50) PRIMARY KEY, applied_at TIMESTAMP...
finanzapp  |    Statement 2: CREATE TABLE IF NOT EXISTS buchungen ( id INT(11) NOT NULL AUTO_INCREMENT, datum DATE NOT NULL, art ...
finanzapp  |    Statement 3: CREATE TABLE IF NOT EXISTS keyword_category ( id INT(11) NOT NULL AUTO_INCREMENT, schluesselwort VAR...
finanzapp  |    Statement 4: CREATE TABLE IF NOT EXISTS category ( id INT(11) NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL...
finanzapp  |    Statement 5: CREATE TABLE IF NOT EXISTS konten ( id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, name VARCHAR(100) N...
finanzapp  |    → Führe Statement 1/5 aus...
finanzapp  |    SQL: CREATE TABLE IF NOT EXISTS schema_migrations ( version VARCHAR(50) PRIMARY KEY, applied_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, description TEXT ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
finanzapp  |    ✓ Statement 1 erfolgreich (affected rows: 0)
finanzapp  |    → Führe Statement 2/5 aus...
finanzapp  |    SQL: CREATE TABLE IF NOT EXISTS buchungen ( id INT(11) NOT NULL AUTO_INCREMENT, datum DATE NOT NULL, art VARCHAR(100) DEFAULT NULL, beschreibung TEXT DEFAULT NULL, soll DECIMAL(10,2) DEFAULT NULL, haben DECIMAL(10,2) DEFAULT NULL, erzeugt_am TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, kategorie VARCHAR(255) DEFAULT NULL, kategorie2 VARCHAR(255) DEFAULT NULL, konto VARCHAR(50) DEFAULT NULL, betrag DECIMAL(10,2) GENERATED ALWAYS AS (IFNULL(haben,0) - IFNULL(soll,0)) STORED, gegen_iban VARCHAR(34) DEFAULT NULL, manually_edit INT(1) DEFAULT NULL, PRIMARY KEY (id), UNIQUE KEY unique_buchung (datum, art, beschreibung(255), soll, haben) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
finanzapp  |    ✓ Statement 2 erfolgreich (affected rows: 0)
finanzapp  |    → Führe Statement 3/5 aus...
finanzapp  |    SQL: CREATE TABLE IF NOT EXISTS keyword_category ( id INT(11) NOT NULL AUTO_INCREMENT, schluesselwort VARCHAR(255) NOT NULL, kategorie VARCHAR(255) NOT NULL, PRIMARY KEY (id), UNIQUE KEY schluesselwort (schluesselwort) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
finanzapp  |    ✓ Statement 3 erfolgreich (affected rows: 0)
finanzapp  |    → Führe Statement 4/5 aus...
finanzapp  |    SQL: CREATE TABLE IF NOT EXISTS category ( id INT(11) NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), UNIQUE KEY uniq_category_name (name) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
finanzapp  |    ✓ Statement 4 erfolgreich (affected rows: 0)
finanzapp  |    → Führe Statement 5/5 aus...
finanzapp  |    SQL: CREATE TABLE IF NOT EXISTS konten ( id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, name VARCHAR(100) NOT NULL, beschreibung VARCHAR(255) DEFAULT NULL, iban VARCHAR(34) DEFAULT NULL, created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), UNIQUE KEY uniq_konten_name (name), UNIQUE KEY uniq_konten_iban (iban) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
finanzapp  |    ✓ Statement 5 erfolgreich (affected rows: 0)
finanzapp  |    ✓ Alle Statements erfolgreich ausgeführt
finanzapp  | ✅ Migration 001 erfolgreich angewendet
finanzapp  | 📝 Wende Migration 002 an: 002_example_add_column.sql
finanzapp  |    ⚠️  Migration 002 enthält nur Kommentare/Beispiele, überspringe...
finanzapp  | ✅ Migration 002 als Beispiel-Migration markiert (übersprungen)
finanzapp  | 📝 Wende Migration 003 an: 003_add_beleg_pfad.sql
finanzapp  |    Gefundene Statements: 2
finanzapp  |    Statement 1: ALTER TABLE buchungen ADD COLUMN beleg_pfad VARCHAR(500) DEFAULT NULL...
finanzapp  |    Statement 2: CREATE INDEX idx_buchungen_beleg_pfad ON buchungen(beleg_pfad)...
finanzapp  |    → Führe Statement 1/2 aus...
finanzapp  |    SQL: ALTER TABLE buchungen ADD COLUMN beleg_pfad VARCHAR(500) DEFAULT NULL
finanzapp  |    ✓ Statement 1 erfolgreich (affected rows: 0)
finanzapp  |    → ALTER TABLE Statement ausgeführt, prüfe sofort ob Spalte existiert...
finanzapp  |    ✓ Spalte beleg_pfad existiert jetzt!
finanzapp  |    → Führe Statement 2/2 aus...
finanzapp  |    SQL: CREATE INDEX idx_buchungen_beleg_pfad ON buchungen(beleg_pfad)
finanzapp  |    ✓ Statement 2 erfolgreich (affected rows: 0)
finanzapp  |    ✓ Alle Statements erfolgreich ausgeführt
finanzapp  |    → Verifiziere, ob Spalte beleg_pfad erstellt wurde...
finanzapp  |    ✓ Verifikation: Spalte beleg_pfad existiert
finanzapp  | ✅ Migration 003 erfolgreich angewendet
finanzapp  | 📝 Wende Migration 004 an: 004_add_performance_indexes.sql
finanzapp  |    Gefundene Statements: 6
finanzapp  |    Statement 1: CREATE INDEX IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)...
finanzapp  |    Statement 2: CREATE INDEX IF NOT EXISTS idx_buchungen_konto ON buchungen(konto)...
finanzapp  |    Statement 3: CREATE INDEX IF NOT EXISTS idx_buchungen_kategorie ON buchungen(kategorie)...
finanzapp  |    Statement 4: CREATE INDEX IF NOT EXISTS idx_buchungen_datum_konto ON buchungen(datum, konto)...
finanzapp  |    Statement 5: CREATE INDEX IF NOT EXISTS idx_buchungen_datum_kategorie ON buchungen(datum, kategorie)...
finanzapp  |    Statement 6: CREATE INDEX IF NOT EXISTS idx_buchungen_datum_id_desc ON buchungen(datum DESC, id DESC)...
finanzapp  |    → Führe Statement 1/6 aus...
finanzapp  |    SQL: CREATE INDEX IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)
finanzapp  |    ❌ Fehler bei Statement 1: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  |    Fehlercode: 1064
finanzapp  |    Statement war: CREATE INDEX IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)
finanzapp  | ❌ Fehler bei Migration 004: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  |    Fehlercode: 1064
finanzapp  | ❌ Fehler bei Migrationen: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  | Traceback (most recent call last):
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/connection_cext.py", line 772, in cmd_query
finanzapp  |     self._cmysql.query(
finanzapp  | _mysql_connector.MySQLInterfaceError: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  |
finanzapp  | The above exception was the direct cause of the following exception:
finanzapp  |
finanzapp  | Traceback (most recent call last):
finanzapp  |   File "/app/init_db.py", line 48, in <module>
finanzapp  |     main()
finanzapp  |   File "/app/init_db.py", line 37, in main
finanzapp  |     run_migrations()
finanzapp  |   File "/app/migrate.py", line 294, in main
finanzapp  |     apply_migration(conn, migration)
finanzapp  |   File "/app/migrate.py", line 149, in apply_migration
finanzapp  |     cur.execute(statement)
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/cursor_cext.py", line 353, in execute
finanzapp  |     self._connection.cmd_query(
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/opentelemetry/context_propagation.py", line 97, in wrapper
finanzapp  |     return method(cnx, *args, **kwargs)
finanzapp  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/connection_cext.py", line 781, in cmd_query
finanzapp  |     raise get_mysql_exception(
finanzapp  | mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  | ❌ Fehler bei Datenbankinitialisierung!
finanzapp  |    Versuche es erneut...
finanzapp  | Traceback (most recent call last):
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/connection_cext.py", line 772, in cmd_query
finanzapp  | 🔄 Führe Datenbank-Migrationen aus...
finanzapp  | 🔄 Prüfe Datenbank-Migrationen...
finanzapp  |    Bereits angewendet: 3 Migration(en)
finanzapp  |    1 neue Migration(en) gefunden
finanzapp  | 📝 Wende Migration 004 an: 004_add_performance_indexes.sql
finanzapp  |    Gefundene Statements: 6
finanzapp  |    Statement 1: CREATE INDEX IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)...
finanzapp  |    Statement 2: CREATE INDEX IF NOT EXISTS idx_buchungen_konto ON buchungen(konto)...
finanzapp  |    Statement 3: CREATE INDEX IF NOT EXISTS idx_buchungen_kategorie ON buchungen(kategorie)...
finanzapp  |    Statement 4: CREATE INDEX IF NOT EXISTS idx_buchungen_datum_konto ON buchungen(datum, konto)...
finanzapp  |    Statement 5: CREATE INDEX IF NOT EXISTS idx_buchungen_datum_kategorie ON buchungen(datum, kategorie)...
finanzapp  |    Statement 6: CREATE INDEX IF NOT EXISTS idx_buchungen_datum_id_desc ON buchungen(datum DESC, id DESC)...
finanzapp  |    → Führe Statement 1/6 aus...
finanzapp  |    SQL: CREATE INDEX IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)
finanzapp  |    ❌ Fehler bei Statement 1: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  |    Fehlercode: 1064
finanzapp  |    Statement war: CREATE INDEX IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)
finanzapp  | ❌ Fehler bei Migration 004: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  |    Fehlercode: 1064
finanzapp  | ❌ Fehler bei Migrationen: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  |     self._cmysql.query(
finanzapp  | _mysql_connector.MySQLInterfaceError: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  |
finanzapp  | The above exception was the direct cause of the following exception:
finanzapp  |
finanzapp  | Traceback (most recent call last):
finanzapp  |   File "/app/init_db.py", line 48, in <module>
finanzapp  |     main()
finanzapp  |   File "/app/init_db.py", line 37, in main
finanzapp  |     run_migrations()
finanzapp  |   File "/app/migrate.py", line 294, in main
finanzapp  |     apply_migration(conn, migration)
finanzapp  |   File "/app/migrate.py", line 149, in apply_migration
finanzapp  |     cur.execute(statement)
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/cursor_cext.py", line 353, in execute
finanzapp  |     self._connection.cmd_query(
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/opentelemetry/context_propagation.py", line 97, in wrapper
finanzapp  |     return method(cnx, *args, **kwargs)
finanzapp  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/connection_cext.py", line 781, in cmd_query
finanzapp  |     raise get_mysql_exception(
finanzapp  | mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  | ❌ Datenbankinitialisierung fehlgeschlagen!
finanzapp  |    Bitte Logs prüfen: docker compose logs app
finanzapp  | 🚀 Starte Finanzapp Container...
finanzapp  | ⏳ Warte auf MySQL Datenbank (interne DB)...
finanzapp  | ✅ MySQL ist bereit
finanzapp  | ⚙️  Erstelle/aktualisiere config.json...
finanzapp  | ✅ config.json aktualisiert
finanzapp  | 🗄️  Initialisiere Datenbank...
finanzapp  | 🔄 Führe Datenbank-Migrationen aus...
finanzapp  | 🔄 Prüfe Datenbank-Migrationen...
finanzapp  |    Bereits angewendet: 3 Migration(en)
finanzapp  |    1 neue Migration(en) gefunden
finanzapp  | 📝 Wende Migration 004 an: 004_add_performance_indexes.sql
finanzapp  |    Gefundene Statements: 6
finanzapp  |    Statement 1: CREATE INDEX IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)...
finanzapp  |    Statement 2: CREATE INDEX IF NOT EXISTS idx_buchungen_konto ON buchungen(konto)...
finanzapp  |    Statement 3: CREATE INDEX IF NOT EXISTS idx_buchungen_kategorie ON buchungen(kategorie)...
finanzapp  |    Statement 4: CREATE INDEX IF NOT EXISTS idx_buchungen_datum_konto ON buchungen(datum, konto)...
finanzapp  |    Statement 5: CREATE INDEX IF NOT EXISTS idx_buchungen_datum_kategorie ON buchungen(datum, kategorie)...
finanzapp  |    Statement 6: CREATE INDEX IF NOT EXISTS idx_buchungen_datum_id_desc ON buchungen(datum DESC, id DESC)...
finanzapp  |    → Führe Statement 1/6 aus...
finanzapp  |    SQL: CREATE INDEX IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)
finanzapp  |    ❌ Fehler bei Statement 1: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  |    Fehlercode: 1064
finanzapp  |    Statement war: CREATE INDEX IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)
finanzapp  | ❌ Fehler bei Migration 004: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  |    Fehlercode: 1064
finanzapp  | ❌ Fehler bei Migrationen: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  | Traceback (most recent call last):
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/connection_cext.py", line 772, in cmd_query
finanzapp  |     self._cmysql.query(
finanzapp  | _mysql_connector.MySQLInterfaceError: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  |
finanzapp  | The above exception was the direct cause of the following exception:
finanzapp  |
finanzapp  | Traceback (most recent call last):
finanzapp  |   File "/app/init_db.py", line 48, in <module>
finanzapp  |     main()
finanzapp  |   File "/app/init_db.py", line 37, in main
finanzapp  |     run_migrations()
finanzapp  |   File "/app/migrate.py", line 294, in main
finanzapp  |     apply_migration(conn, migration)
finanzapp  |   File "/app/migrate.py", line 149, in apply_migration
finanzapp  |     cur.execute(statement)
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/cursor_cext.py", line 353, in execute
finanzapp  |     self._connection.cmd_query(
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/opentelemetry/context_propagation.py", line 97, in wrapper
finanzapp  |     return method(cnx, *args, **kwargs)
finanzapp  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/connection_cext.py", line 781, in cmd_query
finanzapp  |     raise get_mysql_exception(
finanzapp  | mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  | ❌ Fehler bei Datenbankinitialisierung!
finanzapp  |    Versuche es erneut...
finanzapp  | Traceback (most recent call last):
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/connection_cext.py", line 772, in cmd_query
finanzapp  |     self._cmysql.query(
finanzapp  | _mysql_connector.MySQLInterfaceError: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  |
finanzapp  | The above exception was the direct cause of the following exception:
finanzapp  |
finanzapp  | Traceback (most recent call last):
finanzapp  |   File "/app/init_db.py", line 48, in <module>
finanzapp  |     main()
finanzapp  |   File "/app/init_db.py", line 37, in main
finanzapp  | 🔄 Führe Datenbank-Migrationen aus...
finanzapp  | 🔄 Prüfe Datenbank-Migrationen...
finanzapp  |    Bereits angewendet: 3 Migration(en)
finanzapp  |    1 neue Migration(en) gefunden
finanzapp  | 📝 Wende Migration 004 an: 004_add_performance_indexes.sql
finanzapp  |    Gefundene Statements: 6
finanzapp  |    Statement 1: CREATE INDEX IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)...
finanzapp  |    Statement 2: CREATE INDEX IF NOT EXISTS idx_buchungen_konto ON buchungen(konto)...
finanzapp  |    Statement 3: CREATE INDEX IF NOT EXISTS idx_buchungen_kategorie ON buchungen(kategorie)...
finanzapp  |    Statement 4: CREATE INDEX IF NOT EXISTS idx_buchungen_datum_konto ON buchungen(datum, konto)...
finanzapp  |    Statement 5: CREATE INDEX IF NOT EXISTS idx_buchungen_datum_kategorie ON buchungen(datum, kategorie)...
finanzapp  |    Statement 6: CREATE INDEX IF NOT EXISTS idx_buchungen_datum_id_desc ON buchungen(datum DESC, id DESC)...
finanzapp  |    → Führe Statement 1/6 aus...
finanzapp  |    SQL: CREATE INDEX IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)
finanzapp  |    ❌ Fehler bei Statement 1: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  |    Fehlercode: 1064
finanzapp  |    Statement war: CREATE INDEX IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)
finanzapp  | ❌ Fehler bei Migration 004: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  |    Fehlercode: 1064
finanzapp  | ❌ Fehler bei Migrationen: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  |     run_migrations()
finanzapp  |   File "/app/migrate.py", line 294, in main
finanzapp  |     apply_migration(conn, migration)
finanzapp  |   File "/app/migrate.py", line 149, in apply_migration
finanzapp  |     cur.execute(statement)
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/cursor_cext.py", line 353, in execute
finanzapp  |     self._connection.cmd_query(
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/opentelemetry/context_propagation.py", line 97, in wrapper
finanzapp  |     return method(cnx, *args, **kwargs)
finanzapp  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/connection_cext.py", line 781, in cmd_query
finanzapp  |     raise get_mysql_exception(
finanzapp  | mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  | ❌ Datenbankinitialisierung fehlgeschlagen!
finanzapp  |    Bitte Logs prüfen: docker compose logs app
finanzapp  | 🚀 Starte Finanzapp Container...
finanzapp  | ⏳ Warte auf MySQL Datenbank (interne DB)...
finanzapp  | ✅ MySQL ist bereit
finanzapp  | ⚙️  Erstelle/aktualisiere config.json...
finanzapp  | ✅ config.json aktualisiert
finanzapp  | 🗄️  Initialisiere Datenbank...
finanzapp  | 🔄 Führe Datenbank-Migrationen aus...
finanzapp  | 🔄 Prüfe Datenbank-Migrationen...
finanzapp  |    Bereits angewendet: 3 Migration(en)
finanzapp  |    1 neue Migration(en) gefunden
finanzapp  | 📝 Wende Migration 004 an: 004_add_performance_indexes.sql
finanzapp  |    Gefundene Statements: 6
finanzapp  |    Statement 1: CREATE INDEX IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)...
finanzapp  |    Statement 2: CREATE INDEX IF NOT EXISTS idx_buchungen_konto ON buchungen(konto)...
finanzapp  |    Statement 3: CREATE INDEX IF NOT EXISTS idx_buchungen_kategorie ON buchungen(kategorie)...
finanzapp  |    Statement 4: CREATE INDEX IF NOT EXISTS idx_buchungen_datum_konto ON buchungen(datum, konto)...
finanzapp  |    Statement 5: CREATE INDEX IF NOT EXISTS idx_buchungen_datum_kategorie ON buchungen(datum, kategorie)...
finanzapp  |    Statement 6: CREATE INDEX IF NOT EXISTS idx_buchungen_datum_id_desc ON buchungen(datum DESC, id DESC)...
finanzapp  |    → Führe Statement 1/6 aus...
finanzapp  |    SQL: CREATE INDEX IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)
finanzapp  |    ❌ Fehler bei Statement 1: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  |    Fehlercode: 1064
finanzapp  |    Statement war: CREATE INDEX IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)
finanzapp  | ❌ Fehler bei Migration 004: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  |    Fehlercode: 1064
finanzapp  | ❌ Fehler bei Migrationen: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  | Traceback (most recent call last):
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/connection_cext.py", line 772, in cmd_query
finanzapp  |     self._cmysql.query(
finanzapp  | _mysql_connector.MySQLInterfaceError: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  |
finanzapp  | The above exception was the direct cause of the following exception:
finanzapp  |
finanzapp  | Traceback (most recent call last):
finanzapp  |   File "/app/init_db.py", line 48, in <module>
finanzapp  |     main()
finanzapp  |   File "/app/init_db.py", line 37, in main
finanzapp  |     run_migrations()
finanzapp  |   File "/app/migrate.py", line 294, in main
finanzapp  |     apply_migration(conn, migration)
finanzapp  |   File "/app/migrate.py", line 149, in apply_migration
finanzapp  |     cur.execute(statement)
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/cursor_cext.py", line 353, in execute
finanzapp  |     self._connection.cmd_query(
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/opentelemetry/context_propagation.py", line 97, in wrapper
finanzapp  |     return method(cnx, *args, **kwargs)
finanzapp  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
finanzapp  |   File "/usr/local/lib/python3.11/site-packages/mysql/connector/connection_cext.py", line 781, in cmd_query
finanzapp  |     raise get_mysql_exception(
finanzapp  | mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS idx_buchungen_datum ON buchungen(datum)' at line 1
finanzapp  | ❌ Fehler bei Datenbankinitialisierung!
finanzapp  |    Versuche es erneut...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions