aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/media_types
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-12-29 11:15:55 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2012-01-29 16:33:44 -0600
commit70b44584ae4a81e53d39481781c63aec23b23884 (patch)
tree3057c7354c6c76c28845ab60588670fc536aa574 /mediagoblin/media_types
parent8a9aa0758393336fb751c6f77a3d4feaa1903c06 (diff)
downloadmediagoblin-70b44584ae4a81e53d39481781c63aec23b23884.tar.lz
mediagoblin-70b44584ae4a81e53d39481781c63aec23b23884.tar.xz
mediagoblin-70b44584ae4a81e53d39481781c63aec23b23884.zip
Big ol' start of the SQL migrations system.
Things definitely don't work yet, but should be heading in the right direction.
Diffstat (limited to 'mediagoblin/media_types')
-rw-r--r--mediagoblin/media_types/image/models.py17
-rw-r--r--mediagoblin/media_types/video/models.py16
2 files changed, 33 insertions, 0 deletions
diff --git a/mediagoblin/media_types/image/models.py b/mediagoblin/media_types/image/models.py
new file mode 100644
index 00000000..96b5cdf2
--- /dev/null
+++ b/mediagoblin/media_types/image/models.py
@@ -0,0 +1,17 @@
+from mediagoblin.db.sql.models import Base
+
+from sqlalchemy import (
+ Column, Integer, Unicode, UnicodeText, DateTime, Boolean, ForeignKey,
+ UniqueConstraint)
+
+
+class ImageData(Base):
+ __tablename__ = "image__data"
+
+ id = Column(Integer, primary_key=True)
+ width = Column(Integer)
+ height = Column(Integer)
+
+
+DATA_MODEL = ImageData
+MODELS = [ImageData]
diff --git a/mediagoblin/media_types/video/models.py b/mediagoblin/media_types/video/models.py
new file mode 100644
index 00000000..c44f1919
--- /dev/null
+++ b/mediagoblin/media_types/video/models.py
@@ -0,0 +1,16 @@
+from mediagoblin.db.sql.models import Base
+
+from sqlalchemy import (
+ Column, Integer, Unicode, UnicodeText, DateTime, Boolean, ForeignKey,
+ UniqueConstraint)
+
+
+class VideoData(Base):
+ __tablename__ = "video__data"
+
+ id = Column(Integer, primary_key=True)
+ integer
+
+
+DATA_MODEL = VideoData
+MODELS = [VideoData]