alter table layout_pages add url_name varchar(100) select page_id, name from layout_pages update layout_pages set url_name = :url_name where page_id = :page_id alter table layout_pages constraint l_pages_pageset_id_name_un unique (url_name, name, pageset_id)