-- 014_asset_version.sql
-- Adds asset_version column to customers table.
-- Stores the UI asset version used at order creation time so that
-- postcard rendering always uses the correct template/frame/botanical images
-- even if assets are updated in future versions.
-- Version 1 = original asset set (postcard_back_template.webp, cover_frame.webp etc)

ALTER TABLE customers ADD COLUMN IF NOT EXISTS asset_version INTEGER NOT NULL DEFAULT 1;

COMMENT ON COLUMN customers.asset_version IS 'UI asset version used at order creation. Increment when postcard_back_template, cover_frame or botanical images change.';
