return entityDao.getFreshId((Postgres9Connection) con);
}
@Override
public void initialize(PartakeConnection con) throws DAOException {
Postgres9Connection pcon = (Postgres9Connection) con;
entityDao.initialize(pcon);
if (!existsTable(pcon, INDEX_TABLE_NAME)) {
indexDao.createIndexTable(pcon, "CREATE TABLE " + INDEX_TABLE_NAME + "(id TEXT PRIMARY KEY, userId TEXT NOT NULL, ticketId TEXT NOT NULL, eventId TEXT NOT NULL, status TEXT NOT NULL, appliedAt TIMESTAMP NOT NULL)");
indexDao.createIndex(pcon, "CREATE UNIQUE INDEX " + INDEX_TABLE_NAME + "UserIdTicketId" + " ON " + INDEX_TABLE_NAME + "(userId, ticketId)");