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

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.db.Cursor;
import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.DatabaseVersions;
import jp.agentec.adf.util.FileUtil;
import jp.agentec.adf.util.StringUtil;

/**
 * Created by seo-y on 2018/11/26.
 */

public class TTaskReportSend extends SQLiteTableScript {

    public TTaskReportSend() {
        super();
    }

    @Override
    public List<String> getCreateScript(int version) {
        List<String> ddl = new ArrayList<String>();
        StringBuffer sql = new StringBuffer();

        sql.append(" CREATE TABLE t_task_report_send ( ");
        sql.append("        task_report_send_id INTEGER NOT NULL ");
        sql.append("      , task_key TEXT NOT NULL ");
        sql.append("      , task_report_id INTEGER DEFAULT 0 ");
        sql.append("      , report_start_date DATETIME ");
        sql.append("      , json_data TEXT NOT NULL ");
        sql.append("      , save_date DATE NOT NULL ");
        sql.append("      , delete_flg BOOLEAN NOT NULL DEFAULT 0 ");
        sql.append("      , hotspot_changed_flg BOOLEAN DEFAULT 0 ");
        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;
    }
}
