package jp.agentec.abook.abv.bl.data.tables;

import java.util.ArrayList;
import java.util.List;

import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
import jp.agentec.abook.abv.bl.data.DatabaseVersions;

public class TEnquete extends SQLiteTableScript {
	
	public TEnquete() {
	}
	
	@Override
	public List<String> getCreateScript(int version) {
		List<String> ddl = new ArrayList<String>();
		StringBuffer sql = new StringBuffer();
		
		//	since 1.0.0
		sql.append(" CREATE TABLE t_enquete ( ");
		sql.append("        enquete_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT ");
		sql.append("      , ab_object_id BIGINT NOT NULL ");
		sql.append("      , ab_enquete_id BIGINT NOT NULL ");
		sql.append("      , content_id BIGINT NOT NULL ");
		sql.append("      , reply_date_str DATETIME NOT NULL ");
		sql.append("      , param TEXT NOT NULL ");
		sql.append("      , reply_flg BOOLEAN ");
		sql.append(" ) ");
		
		ddl.add(sql.toString());
		
		return ddl;
	}

	@Override
	public List<String> getUpgradeScript(int oldVersion, int newVersion) {
		return null;
	}

	@Override
	public List<String> getMigrationScript(SQLiteDatabase databaseConnection, int oldVersion, int newVersion, Object... params) {
		return null;
	}
}
