-- Run this in Supabase SQL Editor if "Update" never appears on community copies
-- (or you see errors about version / copied_from_version).
-- Uses schema omotomo (match your app's db.schema in src/lib/supabase.js).

ALTER TABLE omotomo.decks
  ADD COLUMN IF NOT EXISTS version integer NOT NULL DEFAULT 1;

ALTER TABLE omotomo.decks
  ADD COLUMN IF NOT EXISTS copied_from_version integer NULL;
