(saveddata_engine)
| 8 | |
| 9 | |
| 10 | def upgrade(saveddata_engine): |
| 11 | if saveddata_engine.execute( |
| 12 | "SELECT name FROM sqlite_master WHERE type='table' AND name='fighters'").scalar() == 'fighters': |
| 13 | # Fighters table exists |
| 14 | try: |
| 15 | saveddata_engine.execute("SELECT active FROM fighters LIMIT 1") |
| 16 | except sqlalchemy.exc.DatabaseError: |
| 17 | # if we don't have the active column, we are on an old pre-release version. Drop the tables and move on |
| 18 | # (they will be recreated) |
| 19 | |
| 20 | saveddata_engine.execute("DROP TABLE fighters") |
| 21 | saveddata_engine.execute("DROP TABLE fightersAbilities") |
nothing calls this directly
no outgoing calls
no test coverage detected