Auto-create the sites and domains tables.
This commit is contained in:
@@ -187,12 +187,20 @@ public class JDBCTableSiteIdentifier implements SiteIdentifier
|
|||||||
throws PersistenceException
|
throws PersistenceException
|
||||||
{
|
{
|
||||||
// we are the operation!
|
// we are the operation!
|
||||||
execute(this);
|
executeUpdate(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object invoke (Connection conn, DatabaseLiaison liaison)
|
public Object invoke (Connection conn, DatabaseLiaison liaison)
|
||||||
throws PersistenceException, SQLException
|
throws PersistenceException, SQLException
|
||||||
{
|
{
|
||||||
|
JDBCUtil.createTableIfMissing(conn, "sites", new String[] {
|
||||||
|
"siteId INTEGER UNSIGNED NOT NULL",
|
||||||
|
"siteString VARCHAR(255) NOT NULL",
|
||||||
|
}, "");
|
||||||
|
JDBCUtil.createTableIfMissing(conn, "domains", new String[] {
|
||||||
|
"domain VARCHAR(255) NOT NULL",
|
||||||
|
"siteId INTEGER UNSIGNED NOT NULL",
|
||||||
|
}, "");
|
||||||
Statement stmt = conn.createStatement();
|
Statement stmt = conn.createStatement();
|
||||||
try {
|
try {
|
||||||
// first load up the list of sites
|
// first load up the list of sites
|
||||||
|
|||||||
Reference in New Issue
Block a user