package siprp.update.updates;

import com.evolute.module.updater.AbstractUpdate;

/**
 *
 * @author fpalma
 */
public class V9_1_To_V9_2 extends AbstractUpdate
{
	
	public V9_1_To_V9_2()
	{
		super(9.1,9.2,"Soft-delete nas tabelas de higiene e saude");
	}
	
	@Override
	public void doUpdate() throws Exception
	{
		com.evolute.utils.sql.Update update = 
			new com.evolute.utils.sql.Update(
					"alter table hs_area add column deleted_date timestamp;" +
					"alter table hs_equipamento_medico add column deleted_date timestamp;" +
					"alter table hs_legislacao add column deleted_date timestamp;" +
					"alter table hs_legislacao_categoria add column deleted_date timestamp;" +
					"alter table hs_medida add column deleted_date timestamp;" +
					"alter table hs_normalizacao add column deleted_date timestamp;" +
					"alter table hs_posto add column deleted_date timestamp;" +
					"alter table hs_relatorio_medida add column deleted_date timestamp;" +
					"alter table hs_relatorio_risco add column deleted_date timestamp;" +
					"alter table hs_risco add column deleted_date timestamp;" +
					"alter table hs_risco_tema add column deleted_date timestamp;"
		);
		getExecuter().executeQuery( update );
	}
	
}
