-- Kvitt server schema v3: the app's versionName per device (devices.app_version_name), sent in the -- X-Kvitt-App-Version-Name header and written like app_version_code (SPEC §14.3.1, §8.2). Do not edit; add a new -- migration and bump the schema version (SPEC §14.8). Applied on top of 0002_categories_v2.sql. -- -- Existing devices keep every column and get NULL until their next request that carries the header. ALTER TABLE devices ADD COLUMN app_version_name TEXT CHECK (app_version_name IS NULL OR length(app_version_name) BETWEEN 1 AND 32); UPDATE meta SET value = '3' WHERE key = 'schema_version';