Step 0 of the roadmap: everything from the moderation queue onward adds
columns, and init_db could only ever run CREATE TABLE IF NOT EXISTS, so
it could not alter a live deployment.
- Track schema state in PRAGMA user_version and run ordered migrations.
Fresh installs create the v1 table and migrate forward, so the upgrade
path runs on every new deployment rather than only on old ones.
- Rebuild media with UNIQUE(owner_id, file_unique_id). The old global
unique constraint stopped two users from each saving the same file,
which blocks public mode.
- Replace INSERT OR REPLACE with an upsert. Replacing deleted and
reinserted the row, giving it a new id and silently invalidating any
id the user had noted from /list.
- Give search_media an optional owner_id scope, defaulting to the
current shared-library behaviour.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- Split docker-compose into build (docker-compose.build.yaml) and deploy (docker-compose.yaml pulls from registry)
- Add push.sh for building and pushing versioned images to git.goyban.com/goyban/bot_meme
- Add ADMIN_USERS env var; admins can add/edit/delete, users can search
- Add /edit command with inline keyboard to update meme keywords
- Add sticker support (save and serve via inline)
- Switch /delete to use numeric row ID instead of file_unique_id
- Search is now global (shared pool) instead of per-user
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>