/*
 * V8_1_To_V8_2.java
 *
 * Created on December 19, 2007, 3:12 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package siprp.update.updates;

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

/**
 *
 * @author fpalma
 */
public class V8_8_To_V8_9
		implements siprp.update.Update
{
	
	/**
	 * Creates a new instance of V8_6_To_V8_7
	 */
	public V8_8_To_V8_9()
	{
	}
	
	public String []listChanges()
	{
		return new String[]{ "Adicionada coluna em 'lembretes' para marcar lembretes já tratados" };
	}
	
	public double getStartVersion()
	{
		return 8.8;
	}
	
	public double getEndVersion()
	{
		return 8.9;
	}
	
	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 lembretes add column deleted_date timestamp;" );
		executer.executeQuery( update );
	}
	
	public String toString()
	{
		return "v" + getStartVersion() + " para v" + getEndVersion();
	}
}
