--freemarker template
--Werden immer ausgetauscht:
delete from fm_templates where id in (select id from tmp_templates);


<#if SQLdialect='Postgres'>
select sp_update_sequence('fm_templates');
</#if>

insert into fm_templates(
       id,
       content,
       description,
       comment,
       version)
 SELECT 
       id,
       content,
       description,
       comment,
       version
FROM tmp_templates;

drop table tmp_templates;

