Skip to content

Commit f4617b5

Browse files
Add test for ENUM datatype
1 parent d7d0244 commit f4617b5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/test/java/org/javawebstack/orm/test/automigrate/CommonTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ public void testPrimitiveIntegerDatatype() throws SQLException {
7878

7979
columnDataTypeMap.put("uuid", "varchar(36)");
8080

81+
columnDataTypeMap.put("option_enum", "enum('OPTION1','OPTION2')");
82+
8183
for(Map.Entry<String, String> entry : columnDataTypeMap.entrySet()) {
8284
checkedField = new Field(tableName, entry.getKey());
8385

@@ -155,5 +157,15 @@ public static class Datatype extends Model {
155157

156158
@Column
157159
UUID uuid;
160+
161+
@Column
162+
OptionEnum optionEnum;
163+
164+
}
165+
166+
public static enum OptionEnum {
167+
168+
OPTION1,
169+
OPTION2;
158170
}
159171
}

0 commit comments

Comments
 (0)