mybatis.uudb-pool.mysql.xml Maven / Gradle / Ivy
CREATE TABLE IF NOT EXISTS UUDB_POOLS (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(64) NOT NULL,
keyType VARCHAR(64) NOT NULL,
valueType VARCHAR(64) NOT NULL,
UNIQUE (name)
) ENGINE=InnoDB DEFAULT CHARSET=#{param1} AUTO_INCREMENT=1;
CREATE TABLE IF NOT EXISTS UUDB_POOL_ENTRIES (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
pool INTEGER,
entry VARCHAR(64),
poolKey VARCHAR(512) DEFAULT NULL,
lastAccess DATETIME,
freezeTime DATETIME DEFAULT NULL,
UNIQUE (pool, entry),
FOREIGN KEY (pool) REFERENCES UUDB_POOLS (id) ON DELETE CASCADE,
INDEX (pool, entry)
) ENGINE=InnoDB DEFAULT CHARSET=#{param1} AUTO_INCREMENT=1;