mirror of
https://github.com/lutris/lutris
synced 2024-11-05 18:10:49 +00:00
Add missing migration
This commit is contained in:
parent
8f36687a2c
commit
3ed5e204ac
1 changed files with 18 additions and 0 deletions
18
lutris/migrations/migrate_steam_appids.py
Normal file
18
lutris/migrations/migrate_steam_appids.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
"""Set service ID for Steam games"""
|
||||
from lutris.database.games import PGA_DB, get_games, sql
|
||||
|
||||
|
||||
def migrate():
|
||||
"""Run migration"""
|
||||
for game in get_games():
|
||||
if not game["steamid"]:
|
||||
continue
|
||||
if game["runner"] and game["runner"] != "steam":
|
||||
continue
|
||||
print("Migrating Steam game %s" % game["name"])
|
||||
sql.db_update(
|
||||
PGA_DB,
|
||||
"games",
|
||||
{"service": "steam", "service_id": game["steamid"]},
|
||||
{"id": game["id"]}
|
||||
)
|
Loading…
Reference in a new issue