package siprp.update.updates;

import static com.evolute.utils.strings.UnicodeLatin1Map.atilde;
import static com.evolute.utils.strings.UnicodeLatin1Map.ccedil;
import static com.evolute.utils.strings.UnicodeLatin1Map.oacute;
import static com.evolute.utils.strings.UnicodeLatin1Map.uacute;

import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;

import javax.imageio.ImageIO;

import siprp.higiene.gestao.importacao.Importador;

import com.evolute.utils.Singleton;
import com.evolute.utils.arrays.Virtual2DArray;
import com.evolute.utils.db.DBManager;
import com.evolute.utils.db.Executer;
import com.evolute.utils.sql.Assignment;
import com.evolute.utils.sql.BlobUpdate;
import com.evolute.utils.sql.Field;
import com.evolute.utils.sql.Insert;
import com.evolute.utils.sql.Select2;
import com.evolute.utils.sql.Update;

public class V11_1_To_V11_2 implements siprp.update.Update
{
	
	public V11_1_To_V11_2()
	{
	}
	
	public String []listChanges()
	{
		return new String[]{
		                    "Higiene e seguranca: a repor datas de submissao dos relatorios"
		                    };
	}
	
	public double getStartVersion()
	{
		return 11.1;
	}
	
	public double getEndVersion()
	{
		return 11.2;
	}
	
	public void doUpdate() throws Exception
	{
		DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER );
		Executer executer = dbm.getSharedExecuter();
		com.evolute.utils.sql.Update update = 
			new com.evolute.utils.sql.Update( "update hs_relatorio set is_submetido = null;" );
		executer.executeQuery( update );
		new Importador( executer ).importar();
	}
	
	public String toString()
	{
		return "v" + getStartVersion() + " para v" + getEndVersion();
	}
	
}
