build share count
This commit is contained in:
@@ -66,6 +66,10 @@ if (!memesCols.find((c) => c.name === 'ocr_text')) {
|
||||
db.exec('ALTER TABLE memes ADD COLUMN ocr_text TEXT');
|
||||
}
|
||||
|
||||
if (!memesCols.find((c) => c.name === 'share_count')) {
|
||||
db.exec('ALTER TABLE memes ADD COLUMN share_count INTEGER NOT NULL DEFAULT 0');
|
||||
}
|
||||
|
||||
// Indexes that depend on migrated columns — created after columns are guaranteed to exist
|
||||
db.exec(`
|
||||
CREATE INDEX IF NOT EXISTS idx_memes_collection_id ON memes(collection_id);
|
||||
|
||||
Reference in New Issue
Block a user