package siprp.update.updates;

import com.evolute.module.updater.AbstractUpdate;
import com.evolute.utils.db.Executer;

public class V10_6_To_V10_7 extends AbstractUpdate
{
	
	public V10_6_To_V10_7()
	{
		super(10.6,10.7,"Alteracao de tamanho maximo em campos de descricao");
	}
	
	@Override
	public void doUpdate() throws Exception
	{
		Executer executer = getExecuter();
		com.evolute.utils.sql.Update update = 
			new com.evolute.utils.sql.Update(
				"alter table hs_risco alter column description type varchar(8192); " + 
				"alter table hs_relatorio_risco alter column description type varchar(8192); " +
				"alter table hs_normalizacao alter column descricao type varchar(8192); " +
				"alter table hs_relatorio_normalizacao alter column descricao type varchar(8192); " +
				"alter table hs_legislacao alter column description type varchar(8192); " +
				"alter table hs_relatorio_legislacao alter column descricao type varchar(8192); " +
				"alter table hs_area alter column description type varchar(1024); " +
				"alter table hs_relatorio_area alter column description type varchar(1024); " +
				"alter table hs_posto alter column description type varchar(1024); " +
				"alter table hs_relatorio_posto alter column description type varchar(1024); "
		);
		executer.executeQuery( update );
	}
	
}
