package siprp.update.updates;

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

public class V10_3_To_V10_4
		implements siprp.update.Update
{
	
	public V10_3_To_V10_4()
	{
	}
	
	public String []listChanges()
	{
		return new String[]{
		                    "adicionado campo a empresa (Imprimir tabela alargada)"
		                    };
	}
	
	public double getStartVersion()
	{
		return 10.3;
	}
	
	public double getEndVersion()
	{
		return 10.4;
	}
	
	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 empresas add column imprimir_tabela_alargada boolean;"
		);
		executer.executeQuery( update );
	}
	
	public String toString()
	{
		return "v" + getStartVersion() + " para v" + getEndVersion();
	}
}
