Skip to content

Commit

Permalink
postgresql compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ikolar authored and Nathan Wright committed Aug 19, 2010
1 parent bd5e3f4 commit a2740bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Column('id', Integer, autoincrement=True, primary_key=True),
Column('media_id', Integer, ForeignKey('media.id', onupdate='CASCADE', ondelete='CASCADE'), nullable=False),

Column('type', Enum('video', 'audio', 'audio_desc', 'captions'), nullable=False),
Column('type', Enum('video', 'audio', 'audio_desc', 'captions', name='type'), nullable=False),
Column('container', String(10), nullable=False),
Column('display_name', String(255), nullable=False),
Column('file_name', String(255)),
Expand Down
4 changes: 2 additions & 2 deletions mediacore/model/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class UnknownFileTypeException(MediaFileException): pass

media = Table('media', metadata,
Column('id', Integer, autoincrement=True, primary_key=True),
Column('type', Enum(VIDEO, AUDIO)),
Column('type', Enum(VIDEO, AUDIO, name="type")),
Column('slug', Unicode(slug_length), unique=True, nullable=False),
Column('podcast_id', Integer, ForeignKey('podcasts.id', onupdate='CASCADE', ondelete='SET NULL')),
Column('reviewed', Boolean, default=False, nullable=False),
Expand Down Expand Up @@ -89,7 +89,7 @@ class UnknownFileTypeException(MediaFileException): pass
Column('id', Integer, autoincrement=True, primary_key=True),
Column('media_id', Integer, ForeignKey('media.id', onupdate='CASCADE', ondelete='CASCADE'), nullable=False),

Column('type', Enum(VIDEO, AUDIO, AUDIO_DESC, CAPTIONS), nullable=False),
Column('type', Enum(VIDEO, AUDIO, AUDIO_DESC, CAPTIONS, name="type"), nullable=False),
Column('container', Unicode(10), nullable=False),
Column('display_name', Unicode(255), nullable=False),
Column('file_name', Unicode(255)),
Expand Down

0 comments on commit a2740bd

Please sign in to comment.