package org.commonjava.indy.schedule.datastax;

public class ScheduleDBUtil
{

    public static String getSchemaCreateTableSchedule( String keyspace )
    {
        return "CREATE TABLE IF NOT EXISTS " + keyspace + ".schedule ("
                        + "jobtype varchar,"
                        + "jobname varchar,"
                        + "storekey varchar,"
                        + "scheduletime timestamp,"
                        + "lifescan bigint,"
                        + "expiration varchar,"
                        + "PRIMARY KEY (storekey, jobname)"
                        + ");";
    }

}

package org.commonjava.indy.schedule.datastax;

public class ScheduleDBUtil
{

    public static final String TABLE_SCHEDULE = "schedule";

    public static String getSchemaCreateTableSchedule( String keyspace )
    {
        return "CREATE TABLE IF NOT EXISTS " + keyspace + "." + TABLE_SCHEDULE + " ("
                        + "jobtype varchar,"
                        + "jobname varchar,"
                        + "storekey varchar,"
                        + "scheduletime timestamp,"
                        + "lifescan bigint,"
                        + "expiration varchar,"
                        + "PRIMARY KEY (storekey, jobname)"
                        + ");";
    }

    public static String getSchemaCreateTypeIndex4Schedule( String keyspace )
    {
        return "CREATE INDEX IF NOT EXISTS type_idx on " + keyspace + "." + TABLE_SCHEDULE + " (jobtype)";
    }

}

Add jobtype as index for schedule
Add jobtype as index for schedule
