From 50ae61c7b2b20912b765bda41f6c1169ba7c250e Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Date: Sun, 8 Oct 2023 11:06:06 -0300 Subject: [PATCH] Add default value for autoconf --- skynet/db/functions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/skynet/db/functions.py b/skynet/db/functions.py index bc759d3..91a493e 100644 --- a/skynet/db/functions.py +++ b/skynet/db/functions.py @@ -43,6 +43,7 @@ CREATE TABLE IF NOT EXISTS skynet.user_config( guidance DECIMAL NOT NULL, strength DECIMAL NOT NULL, upscaler VARCHAR(128), + autoconf BOOLEAN DEFAULT TRUE, CONSTRAINT fk_config FOREIGN KEY(id) REFERENCES skynet.user(id) @@ -172,7 +173,7 @@ async def open_database_connection( ''') if not col_check: - await conn.execute('alter table skynet.user_config add column autoconf boolean;') + await conn.execute('alter table skynet.user_config add column autoconf boolean default true;') async def _db_call(method: str, *args, **kwargs): method = getattr(db, method)