Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SiCKRAGE
sickrage
Commits
5a953095
Commit
5a953095
authored
Mar 16, 2022
by
echel0n
Browse files
Fixed SQL relationship issues between TV Shows and Episodes
parent
81c2da37
Changes
1
Hide whitespace changes
Inline
Side-by-side
sickrage/core/databases/main/__init__.py
View file @
5a953095
...
...
@@ -331,7 +331,8 @@ class MainDB(SRDatabase):
last_backlog_search
=
Column
(
DateTime
(
timezone
=
True
),
default
=
datetime
.
datetime
.
now
())
last_proper_search
=
Column
(
DateTime
(
timezone
=
True
),
default
=
datetime
.
datetime
.
now
())
episodes
=
relationship
(
'TVEpisode'
,
uselist
=
True
,
backref
=
'tv_shows'
,
cascade
=
"all, delete-orphan"
,
lazy
=
'dynamic'
)
episodes
=
relationship
(
'TVEpisode'
,
uselist
=
True
,
back_populates
=
'show'
,
cascade
=
"all, delete-orphan"
,
lazy
=
'dynamic'
)
imdb_info
=
relationship
(
'IMDbInfo'
,
uselist
=
False
,
backref
=
'tv_shows'
,
cascade
=
"all, delete-orphan"
)
series_provider_mapping
=
relationship
(
'SeriesProviderMapping'
,
uselist
=
False
,
backref
=
'tv_shows'
,
cascade
=
"all, delete-orphan"
)
blacklist
=
relationship
(
'Blacklist'
,
uselist
=
False
,
backref
=
'tv_shows'
,
cascade
=
"all, delete-orphan"
)
...
...
@@ -380,7 +381,7 @@ class MainDB(SRDatabase):
version
=
Column
(
Integer
,
default
=-
1
)
release_group
=
Column
(
Text
,
default
=
''
)
show
=
relationship
(
'TVShow'
,
uselist
=
False
,
back
ref
=
'tv_
episodes'
)
show
=
relationship
(
'TVShow'
,
uselist
=
False
,
back
_populates
=
'
episodes'
)
class
IMDbInfo
(
base
):
__tablename__
=
'imdb_info'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment