Datumsspalten auf Date-Typ umgestellt und Normalisierungsmigration
Modelle: startdatum (Projekt), datum und wiedervorlage_datum (CallLog) von String(20) auf Date umgestellt. columns2dict serialisiert diese nun über isoformat() als yyyy-MM-dd. Die String-Normalisierung in columns2dict wurde entfernt, da sie nicht mehr benötigt wird. Migration V01.08: Normalisiert bestehende String-Datumswerte (z.B. '2026-08-3') auf ISO-Format yyyy-MM-dd mittels printf/substr, da SQLite's date() einstellige Komponenten nicht erkennt. Leere Strings werden zu NULL. V01.07 ist Platzhalter für die fehlgeschlagene V01.06. Client: toDateInputValue normalisiert ebenfalls String-Datumswerte als Fallback für Route-Params (Neuanlage). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
1 parent
93827dde0f
commit
461953a7e9
3 files changed
+108
-6
No files matched your search
@@ -12,7 +12,7 @@ erfolgt ausschließlich über __bind_key__.
|
||||
import datetime
|
||||
import decimal
|
||||
|
||||
from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Index, Integer, String
|
||||
from sqlalchemy import Boolean, Column, Date, DateTime, ForeignKey, Index, Integer, String
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from db import dbapp
|
||||
@@ -145,7 +145,7 @@ class Projekt(dbapp.Model):
|
||||
projektname = Column(String(200), nullable=False)
|
||||
zweck = Column(String(2000), nullable=True)
|
||||
verantwortlicher = Column(String(200), nullable=True)
|
||||
startdatum = Column(String(20), nullable=True)
|
||||
startdatum = Column(Date, nullable=True)
|
||||
|
||||
kunde = relationship('Kunde')
|
||||
|
||||
@@ -214,14 +214,14 @@ class CallLog(dbapp.Model):
|
||||
)
|
||||
id = Column(Integer, primary_key=True)
|
||||
projekt_id = Column(Integer, ForeignKey('projekte.id'), nullable=False)
|
||||
datum = Column(String(20), nullable=True)
|
||||
datum = Column(Date, nullable=True)
|
||||
uhrzeit_beginn = Column(String(10), nullable=True)
|
||||
dauer = Column(String(10), nullable=True)
|
||||
betreff = Column(String(200), nullable=True)
|
||||
name_ansprechpartner = Column(String(200), nullable=True)
|
||||
telefon = Column(String(100), nullable=True)
|
||||
notiz = Column(String(2000), nullable=True)
|
||||
wiedervorlage_datum = Column(String(20), nullable=True)
|
||||
wiedervorlage_datum = Column(Date, nullable=True)
|
||||
erledigt = Column(Boolean, nullable=False, default=False)
|
||||
|
||||
projekt = relationship('Projekt')
|
||||
|
||||
Reference in new issue
Block a user