mirror of https://github.com/skygpu/skynet.git
Add default value for autoconf
parent
cadd723191
commit
50ae61c7b2
|
@ -43,6 +43,7 @@ CREATE TABLE IF NOT EXISTS skynet.user_config(
|
||||||
guidance DECIMAL NOT NULL,
|
guidance DECIMAL NOT NULL,
|
||||||
strength DECIMAL NOT NULL,
|
strength DECIMAL NOT NULL,
|
||||||
upscaler VARCHAR(128),
|
upscaler VARCHAR(128),
|
||||||
|
autoconf BOOLEAN DEFAULT TRUE,
|
||||||
CONSTRAINT fk_config
|
CONSTRAINT fk_config
|
||||||
FOREIGN KEY(id)
|
FOREIGN KEY(id)
|
||||||
REFERENCES skynet.user(id)
|
REFERENCES skynet.user(id)
|
||||||
|
@ -172,7 +173,7 @@ async def open_database_connection(
|
||||||
''')
|
''')
|
||||||
|
|
||||||
if not col_check:
|
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):
|
async def _db_call(method: str, *args, **kwargs):
|
||||||
method = getattr(db, method)
|
method = getattr(db, method)
|
||||||
|
|
Loading…
Reference in New Issue