made DC_Creator, DC_Subject, DC_Contributor unique
git-svn-id: http://yolanda.mister-muffin.de/svn@418 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
parent
a3414aef2c
commit
76cbc8dde7
1 changed files with 4 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
||||||
from elixir import *
|
from elixir import *
|
||||||
|
from sqlalchemy import UniqueConstraint
|
||||||
|
|
||||||
class Video(Entity):
|
class Video(Entity):
|
||||||
using_options(tablename='videos')
|
using_options(tablename='videos')
|
||||||
|
@ -44,15 +45,15 @@ class Video(Entity):
|
||||||
# Dublin Core terms
|
# Dublin Core terms
|
||||||
|
|
||||||
class DC_Creator(Entity):
|
class DC_Creator(Entity):
|
||||||
name = Field(Unicode(255))
|
name = Field(Unicode(255), unique = True)
|
||||||
videos = OneToMany('Video')
|
videos = OneToMany('Video')
|
||||||
|
|
||||||
class DC_Subject(Entity):
|
class DC_Subject(Entity):
|
||||||
name = Field(Unicode(32))
|
name = Field(Unicode(32), unique = True)
|
||||||
videos = ManyToMany('Video')
|
videos = ManyToMany('Video')
|
||||||
|
|
||||||
class DC_Contributor(Entity):
|
class DC_Contributor(Entity):
|
||||||
name = Field(Unicode(255))
|
name = Field(Unicode(255), unique = True)
|
||||||
videos = ManyToMany('Video')
|
videos = ManyToMany('Video')
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue