* Fixed index of H2 database. Now booster generation for Cube draft or searching for card in card editor is much faster.

This commit is contained in:
LevelX2 2014-11-14 15:15:40 +01:00
parent a0840ec1b8
commit 89a0a815de
2 changed files with 5 additions and 5 deletions

View file

@ -57,11 +57,11 @@ public class CardInfo {
private static final int MAX_RULE_LENGTH = 700; private static final int MAX_RULE_LENGTH = 700;
private static final String SEPARATOR = "@@@"; private static final String SEPARATOR = "@@@";
@DatabaseField @DatabaseField(indexName = "name_index")
protected String name; protected String name;
@DatabaseField(indexName = "name_cardNumber_index") @DatabaseField(indexName = "setCode_cardNumber_index")
protected int cardNumber; protected int cardNumber;
@DatabaseField(indexName = "name_cardNumber_index") @DatabaseField(indexName = "setCode_cardNumber_index")
protected String setCode; protected String setCode;
@DatabaseField(unique = true) @DatabaseField(unique = true)
protected String className; protected String className;
@ -101,7 +101,7 @@ public class CardInfo {
protected boolean flipCard; protected boolean flipCard;
@DatabaseField @DatabaseField
protected boolean doubleFaced; protected boolean doubleFaced;
@DatabaseField(indexName = "name_cardNumber_index") @DatabaseField(indexName = "name_index")
protected boolean nightCard; protected boolean nightCard;
@DatabaseField @DatabaseField
protected String flipCardName; protected String flipCardName;

View file

@ -56,7 +56,7 @@ public enum CardRepository {
private static final String JDBC_URL = "jdbc:h2:file:./db/cards.h2;AUTO_SERVER=TRUE"; private static final String JDBC_URL = "jdbc:h2:file:./db/cards.h2;AUTO_SERVER=TRUE";
private static final String VERSION_ENTITY_NAME = "card"; private static final String VERSION_ENTITY_NAME = "card";
private static final long CARD_DB_VERSION = 33; private static final long CARD_DB_VERSION = 34;
private final Random random = new Random(); private final Random random = new Random();
private Dao<CardInfo, Object> cardDao; private Dao<CardInfo, Object> cardDao;