This commit is contained in:
Christopher Cookman 2024-08-30 14:23:52 -06:00
parent 6b2dae64d4
commit 3d8a817b04
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42
2 changed files with 14 additions and 2 deletions

View file

@ -1,4 +1,9 @@
-- Add ttsOverride column to the accounts table
ALTER TABLE 'accounts' ADD COLUMN IF NOT EXISTS 'ttsOverride' INTEGER NOT NULL DEFAULT 0;
SELECT COUNT(*)
FROM pragma_table_info('accounts')
WHERE name = 'ttsOverride';
-- Step 2: If the count is 0, add the 'cooldown' column
ALTER TABLE accounts ADD COLUMN ttsOverride TEXT INTEGER NOT NULL DEFAULT 0;
-- Retroactively set ttsOverride to 0 for all accounts that dont have it set at all
UPDATE 'accounts' SET 'ttsOverride' = 0 WHERE 'ttsOverride' IS NULL;

View file

@ -1,2 +1,9 @@
-- Add ttsOverride column to the accounts table
ALTER TABLE 'accounts' ADD COLUMN IF NOT EXISTS 'cooldown' TEXT;
--ALTER TABLE 'accounts' ADD COLUMN 'cooldown' TEXT;
-- Step 1: Check if 'cooldown' column exists in 'accounts' table
SELECT COUNT(*)
FROM pragma_table_info('accounts')
WHERE name = 'cooldown';
-- Step 2: If the count is 0, add the 'cooldown' column
ALTER TABLE accounts ADD COLUMN cooldown TEXT;