Thanks for the reply!
I spent some time looking at liquibase source code. Seems described feature is available not for all databases. Well, for my case I use HSQL for unit tests and postgreSQL for production. And I need to add startWith attribute to the ID column in some table.
Then for my changeset
- <createTable tableName="some_table">
- <column name="id" autoIncrement="true" type="int" startWith="100">
- <constraints primaryKey="true" nullable="false" />
- </column>
- <column name="name" type="text">
- <constraints nullable="false" />
- </column>
- </createTable>
liquibase produces for HSQL
- CREATE TABLE some_table (id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 100) NOT NULL, name LONGVARCHAR NOT NULL, CONSTRAINT PK_SOME_TABLE PRIMARY KEY (id))
and for postgreSQL
- CREATE TABLE some_table (id serial NOT NULL, name TEXT NOT NULL, CONSTRAINT PK_SOME_TABLE PRIMARY KEY (id))
As you see, startWith attribute for postgreSQL is absent. That's a pity.