Upgrading main database to v21 Failure

Howdy, I am attempting to install the V10 of Sickrage and see what it’s all about. I downloaded the source files from GitHub, installed a fresh copy of Python 3.9 (64 bit) and setup Sickrage as a service in NSSM. Services is reporting a paused service.

I opened a admin CMD and executed the sickrage.py script in the Sickrage folder under my program files (x86) folder and was hit with this data dump:

 C:\Program Files (x86)\SiCKRAGE>sickrage
14:05:35 INFO::CORE::Performing disk space checks
14:05:35 INFO::CORE::Performing integrity check on config database
14:05:35 INFO::CORE::Performing migrations on config database
14:05:35 INFO::CORE::Performing upgrades on config database
14:05:35 INFO::CORE::Performing cleanup on config database
14:05:35 INFO::CORE::Performing vacuum on config database
14:05:35 INFO::CORE::Performing integrity check on main database
14:05:35 INFO::CORE::Performing migrations on main database
14:05:35 INFO::CORE::Performing upgrades on main database
14:05:35 INFO::CORE::Upgrading main database to v21
Traceback (most recent call last):
  File "C:\Program Files (x86)\SiCKRAGE\sickrage\__init__.py", line 401, in main
    app.start()
  File "C:\Program Files (x86)\SiCKRAGE\sickrage\core\__init__.py", line 316, in start
    db.upgrade()
  File "C:\Program Files (x86)\SiCKRAGE\sickrage\core\databases\__init__.py", line 191, in upgrade
    self.backup(backup_filename)
  File "C:\Program Files (x86)\SiCKRAGE\sickrage\core\databases\__init__.py", line 326, in backup
    backup_dict['schema'].update({table_name: str(CreateTable(table_object))})
  File "C:\Users\Me\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\sql\elements.py", line 486, in __str__
    return str(self.compile())
  File "<string>", line 1, in <lambda>
  File "C:\Users\Me\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\sql\elements.py", line 476, in compile
    return self._compiler(dialect, bind=bind, **kw)
  File "C:\Users\Me\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\sql\ddl.py", line 29, in _compiler
    return dialect.ddl_compiler(dialect, self, **kw)
  File "C:\Users\Me\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\sql\compiler.py", line 319, in __init__
    self.string = self.process(self.statement, **compile_kwargs)
  File "C:\Users\Me\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\sql\compiler.py", line 350, in process
    return obj._compiler_dispatch(self, **kwargs)
  File "C:\Users\Me\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\sql\visitors.py", line 95, in _compiler_dispatch
    return meth(self, **kw)
  File "C:\Users\Me\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\sql\compiler.py", line 2917, in visit_create_table
    const = self.create_table_constraints(
  File "C:\Users\Me\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\sql\compiler.py", line 2966, in create_table_constraints
    return ", \n\t".join(
  File "C:\Users\Me\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\sql\compiler.py", line 2966, in <genexpr>
    return ", \n\t".join(
  File "C:\Users\Me\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\sql\compiler.py", line 2969, in <genexpr>
    self.process(constraint)
  File "C:\Users\Me\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\sql\compiler.py", line 350, in process
    return obj._compiler_dispatch(self, **kwargs)
  File "C:\Users\Me\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\sql\visitors.py", line 95, in _compiler_dispatch
    return meth(self, **kw)
  File "C:\Users\Me\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\sql\compiler.py", line 3217, in visit_foreign_key_constraint
    remote_table = list(constraint.elements)[0].column.table
  File "C:\Users\Me\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\util\langhelpers.py", line 883, in __get__
    obj.__dict__[self.__name__] = result = self.fget(obj)
  File "C:\Users\Me\AppData\Roaming\Python\Python39\site-packages\sqlalchemy\sql\schema.py", line 2151, in column
    raise exc.NoReferencedColumnError(
sqlalchemy.exc.NoReferencedColumnError: Could not initialize target column for ForeignKey 'tv_shows.series_id' on table 'series_provider_mapping': table 'tv_shows' has no column named 'series_id'

Looks like a database update failure at first glance. Know this is still beta software and under development so figured I’d report it to you.

Deleted the database and let it rebuild. Seems to have done it. Crashed it once again after I restored the DB from backup. So, am just rebuilding the DB from scratch. Config backups appear intact. Looks good so far!

Could you email me the database files you attempted to restore that caused the crash to [email protected] please, want to see what’s causing the issue, thanks!

OK, fairly sure I isolated the issue, seems to be we used | as a separator for subtitle enabled services when storing in the old config.ini and since migrating over to the new config database it was changed to using a , separator by mistake, I’m going to revert that change as the impact it would have on our master branch is far worse then the impact it would have on the few that are using the develop branch.

In your mailbox. Thanks!

Fix is out on develop, thanks!