make drbotzo_modules.module a primary key so that we can use INSERT OR REPLACE INTO
WARNING! if you have an existing drbotzo_modules, you MUST RECREATE IT WITH THE PRIMARY KEY. things will be wonky without it. easiest way is to (by hand) create drbotzo_modules_temp as shown in the code, INSERT INTO drbotzo_modules_temp SELECT * FROM drbotzo_modules, DROP the old table, and ALTER TABLE RENAME TO the new one. again, if you don't do this, newer modules will do all sorts of crazy things, namely trying to create tables that already exist (because they have multiple, differing values in drbotzo_modules)
This commit is contained in:
parent
9ecd66f94a
commit
70e1ee017f
@ -72,7 +72,7 @@ try:
|
||||
# need to create the drbotzo_modules table
|
||||
query = """
|
||||
CREATE TABLE drbotzo_modules (
|
||||
module TEXT,
|
||||
module TEXT PRIMARY KEY,
|
||||
version INTEGER
|
||||
)
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user