ALTER TABLE "match" ADD COLUMN "state" varchar not null default 'NOT_YET_PLAYED';
UPDATE match SET state='PLAYED' WHERE (id IN (SELECT match from game));