from mediagoblin.db.sql.models import Base
from sqlalchemy import (
- Column, Integer, Unicode, UnicodeText, DateTime, Boolean, ForeignKey,
- UniqueConstraint)
+ Column, Integer, Float, ForeignKey)
class ImageData(Base):
__tablename__ = "image_data"
- id = Column(Integer, primary_key=True)
+ # The primary key *and* reference to the main media_entry
+ media_entry = Column(Integer, ForeignKey('media_entries.id'),
+ primary_key=True)
width = Column(Integer)
height = Column(Integer)
- media_entry = Column(
- Integer, ForeignKey('media_entries.id'), nullable=False)
+ gps_longitude = Column(Float)
+ gps_latitude = Column(Float)
DATA_MODEL = ImageData