Skip to content

Commit

Permalink
Merge pull request #62 from blastbeng/dev
Browse files Browse the repository at this point in the history
preparing for release 0.3.1
  • Loading branch information
blastbeng authored Sep 27, 2024
2 parents 8842b0a + 0654336 commit d565b0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spotisub/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
from sqlalchemy import or_
from sqlalchemy import collate


VERSION = "0.3.1"
VERSIONS = ["0.3.0-alpha-01", "0.3.1"]

SQLITE = 'sqlite'
USER = 'user'
Expand Down Expand Up @@ -197,14 +197,14 @@ def upgrade():
upgraded = False
with dbms.db_engine.connect() as conn:
fconfig = select_config_by_name(conn, 'VERSION')
if fconfig is None or fconfig.value != VERSION or fconfig.value != "0.3.0-alpha-01":
if fconfig is None or fconfig.value not in VERSIONS:
# FIRST RELEASE 3.0.0 DROPPING ENTIRE DATABASE
drop_table(conn, SPOTIFY_SONG)
drop_table(conn, SPOTIFY_ALBUM)
drop_table(conn, SPOTIFY_ARTIST)
drop_table(conn, SPOTIFY_SONG_ARTIST_RELATION)
drop_table(conn, SUBSONIC_SPOTIFY_RELATION)

if fconfig is None or fconfig.value != VERSION:
insert_or_update_config(conn, 'VERSION', VERSION)
conn.commit()
upgraded = True
Expand Down

0 comments on commit d565b0a

Please sign in to comment.