package siprp.update.updates;

import com.evolute.utils.Singleton;
import com.evolute.utils.db.DBManager;
import com.evolute.utils.db.Executer;

public class V10_9_To_V11_0 implements siprp.update.Update
{
	
	public V10_9_To_V11_0()
	{
	}
	
	public String []listChanges()
	{
		return new String[]{
		                    "relatorio de higiene e seguranca: adicionado campo 'funcionarios'"
		                    };
	}
	
	public double getStartVersion()
	{
		return 10.9;
	}
	
	public double getEndVersion()
	{
		return 11.0;
	}
	
	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(
					"alter table hs_relatorio add column funcionarios varchar(8192); "
		);
		executer.executeQuery( update );
	}
	
	public String toString()
	{
		return "v" + getStartVersion() + " para v" + getEndVersion();
	}
	
}
