- Fixed AttributeError in User model (added region_code, preferred_language) - Fixed InvalidRequestError in AssetAssignment (added organization relationship) - Configured STATIC_DIR for translation sync - Applied Alembic migrations for user schema updates
16 lines
677 B
Python
Executable File
16 lines
677 B
Python
Executable File
from sqlalchemy import Column, Integer, String, Text, Boolean, UniqueConstraint
|
|
# JAVÍTÁS: Közvetlenül a base_class-ból importálunk, hogy elkerüljük a körkörös importot
|
|
from app.db.base_class import Base
|
|
|
|
class Translation(Base):
|
|
__tablename__ = "translations"
|
|
__table_args__ = (
|
|
UniqueConstraint("key", "lang_code", name="uq_translation_key_lang"),
|
|
{"schema": "data"}
|
|
)
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
key = Column(String(100), nullable=False, index=True)
|
|
lang_code = Column(String(5), nullable=False, index=True)
|
|
value = Column(Text, nullable=False)
|
|
is_published = Column(Boolean, default=False) |