diff --git a/couchpotato/model.py b/couchpotato/model.py index c0b1ee8..1d16614 100644 --- a/couchpotato/model.py +++ b/couchpotato/model.py @@ -29,7 +29,10 @@ class Release(Entity): class File(Entity): """File that belongs to a release.""" - path = Field(UnicodeString(255)) + history = OneToMany('RenameHistory') + path = Field(UnicodeString(255), nullable=False, unique=True) + # Subtitles can have multiple parts, too + part = Field(Integer) release = ManyToOne('Release') # Let's remember the size so we know about offline media. size = Field(Integer)