// no specific clause on PostgreSQL but a specific type
break;
case MsSql.ID:
- res.append(" IDENTITY (0,1)");
+ res.append(" IDENTITY (1,1)");
break;
case MySql.ID:
res.append(" AUTO_INCREMENT");
break;
case H2.ID:
- res.append(" AUTO_INCREMENT (0,1)");
+ res.append(" AUTO_INCREMENT (1,1)");
break;
default:
throw new IllegalArgumentException("Unsupported dialect id " + dialect.getId());
assertThat(stmts).hasSize(1);
assertThat(stmts.iterator().next())
.isEqualTo(
- "CREATE TABLE table_42 (id INT NOT NULL IDENTITY (0,1), CONSTRAINT pk_table_42 PRIMARY KEY (id))");
+ "CREATE TABLE table_42 (id INT NOT NULL IDENTITY (1,1), CONSTRAINT pk_table_42 PRIMARY KEY (id))");
}
@Test
assertThat(stmts).hasSize(1);
assertThat(stmts.iterator().next())
.isEqualTo(
- "CREATE TABLE table_42 (id INTEGER NOT NULL AUTO_INCREMENT (0,1), CONSTRAINT pk_table_42 PRIMARY KEY (id))");
+ "CREATE TABLE table_42 (id INTEGER NOT NULL AUTO_INCREMENT (1,1), CONSTRAINT pk_table_42 PRIMARY KEY (id))");
}
@Test
@Test
public void build_adds_DEFAULT_clause_on_varchar_column_on_Oracle() {
- verifyDefaultClauseOnVarcharColumn(ORACLE, "CREATE TABLE table_42 (status VARCHAR (1) DEFAULT 'P' NOT NULL)");
+ verifyDefaultClauseOnVarcharColumn(ORACLE, "CREATE TABLE table_42 (status VARCHAR (1 CHAR) DEFAULT 'P' NOT NULL)");
}
@Test