Add IF NOT EXISTS to index creation sql statement.

This commit is contained in:
Winston Li 2015-02-22 00:01:08 +00:00
parent fee792f5ee
commit a91390dd37

View file

@ -10,7 +10,8 @@ import java.sql.SQLException;
*/
public class CreateIndexURLIndexStore implements SQLUpdate {
public static final String CREATE_INDEX_URL_INDEX_STORE = "CREATE INDEX `project_path_index` ON `url_index_store`(`project_name`, `path`);\n";
public static final String CREATE_INDEX_URL_INDEX_STORE =
"CREATE INDEX IF NOT EXISTS `project_path_index` ON `url_index_store`(`project_name`, `path`);\n";
@Override
public String getSQL() {