CREATE DEFINER=`jhise`@`localhost` PROCEDURE `project_attach_document`(in i_project_access_key char(32), in i_doc_access_key char(32))
BEGIN
	declare l_project_id int;

    select id into l_project_id from project where access_key = i_project_access_key;

    insert ignore into project_document_jct values (l_project_id, i_doc_access_key);
END
