Skip to content
This repository has been archived by the owner on Aug 10, 2022. It is now read-only.

Commit

Permalink
Add tests for CREATE TABLE with KEY statement
Browse files Browse the repository at this point in the history
  • Loading branch information
John Eckhart committed Mar 29, 2015
1 parent b3d21b8 commit c6605d0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ public void testScript5() throws Exception {
loadScript("xwiki-sqlyog.sql");
}

@Test
public void testScriptCreateTableWithKey() throws Exception {
loadScript("create-table-with-key.sql");
}

private void loadScript(String s) throws Exception {
long time0 = System.currentTimeMillis();

Expand Down
10 changes: 10 additions & 0 deletions converter/src/test/resources/scripts/create-table-with-key.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

CREATE TABLE `sample` (
`ID` bigint(20) NOT NULL AUTO_INCREMENT,
`VALUE` text,
`TIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`version` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`ID`),
UNIQUE KEY `PK_SAMPLE` (`ID`),
KEY `TIME` (`TIME`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='A sample table.';

0 comments on commit c6605d0

Please sign in to comment.