From 2e277e779116512b5d3797a587c4fc9479cfbc42 Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Tue, 8 Aug 2023 10:17:38 -0400 Subject: [PATCH] add arcade ip column --- core/data/schema/versions/CORE_5_rollback.sql | 1 + core/data/schema/versions/CORE_6_upgrade.sql | 1 + dbutils.py | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 core/data/schema/versions/CORE_5_rollback.sql create mode 100644 core/data/schema/versions/CORE_6_upgrade.sql diff --git a/core/data/schema/versions/CORE_5_rollback.sql b/core/data/schema/versions/CORE_5_rollback.sql new file mode 100644 index 0000000..2462fee --- /dev/null +++ b/core/data/schema/versions/CORE_5_rollback.sql @@ -0,0 +1 @@ +ALTER TABLE arcade DROP COLUMN 'ip'; \ No newline at end of file diff --git a/core/data/schema/versions/CORE_6_upgrade.sql b/core/data/schema/versions/CORE_6_upgrade.sql new file mode 100644 index 0000000..013728c --- /dev/null +++ b/core/data/schema/versions/CORE_6_upgrade.sql @@ -0,0 +1 @@ +ALTER TABLE arcade ADD ip varchar(39) NULL; \ No newline at end of file diff --git a/dbutils.py b/dbutils.py index caae9d8..85b18a0 100644 --- a/dbutils.py +++ b/dbutils.py @@ -56,10 +56,10 @@ if __name__ == "__main__": elif args.action == "upgrade" or args.action == "rollback": if args.version is None: - data.logger.warn("No version set, upgrading to latest") + data.logger.warning("No version set, upgrading to latest") if args.game is None: - data.logger.warn("No game set, upgrading core schema") + data.logger.warning("No game set, upgrading core schema") data.migrate_database( "CORE", int(args.version) if args.version is not None else None,