# Ability to specify autoincrement start values

**URL:** <https://forum.liquibase.org/t/ability-to-specify-autoincrement-start-values/1794>\
**Category:** General Discussion\
**Created:** [January 11, 2012, 2:58pm UTC](https://forum.liquibase.org/t/ability-to-specify-autoincrement-start-values/1794 "2012-01-11T14:58:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpodolyako](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@mpodolyako](https://forum.liquibase.org/u/mpodolyako)\
**Post date:** [January 11, 2012, 2:58pm UTC](https://forum.liquibase.org/t/ability-to-specify-autoincrement-start-values/1794/1 "2012-01-11T14:58:00Z")

</div>

Hello,

I found a feature request on “Ability to specify autoincrement start values” in jira&nbsp;[http://liquibase.jira.com/browse/CORE-40](http://liquibase.jira.com/browse/CORE-40).

And it’s marked as fixed in 2.0.2 version. But I couldn’t find any documentation about it. How to use that new feature?

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [January 11, 2012, 2:58pm UTC](https://forum.liquibase.org/t/ability-to-specify-autoincrement-start-values/1794/2 "2012-01-11T14:58:00Z")

</div>

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

1. 
2. 
3. 
4. 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.

---

<div class="post-metadata">

**Author:** ![mikemil2713](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mikemil2713](https://forum.liquibase.org/u/mikemil2713)\
**Post date:** [January 11, 2012, 2:58pm UTC](https://forum.liquibase.org/t/ability-to-specify-autoincrement-start-values/1794/3 "2012-01-11T14:58:00Z")

</div>

Here’s the [commit history in GitHub](https://github.com/liquibase/liquibase/commit/f8a514a50c81946050e6d7dc73e88470f19ed41b#diff-0)&nbsp;for that update. &nbsp;You can see the code updates and maybe that will help.

Here’s a test case from the CreateTableGeneratorTest.java class, look at line 10 and maybe that will help!

1. 
2. @Test
3. &nbsp; &nbsp; public void testAutoIncrementStartWithIncrementByMySQLDatabase() throws Exception {
4. &nbsp; &nbsp; }
5. &nbsp; &nbsp; }

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [January 11, 2012, 2:58pm UTC](https://forum.liquibase.org/t/ability-to-specify-autoincrement-start-values/1794/4 "2012-01-11T14:58:00Z")

</div>

Thanks for finding that. I created&nbsp; [http://liquibase.jira.com/browse/CORE-1103](http://liquibase.jira.com/browse/CORE-1103)&nbsp;to track it.

Nathan

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [January 11, 2012, 2:58pm UTC](https://forum.liquibase.org/t/ability-to-specify-autoincrement-start-values/1794/5 "2012-01-11T14:58:00Z")

</div>

I noticed a similar issue with MS SQL Server and created [http://liquibase.jira.com/browse/CORE-1182.](http://liquibase.jira.com/browse/CORE-1182.)  
  
By the way, is there a liquibase XSD schema that takes into account the column tag ? [http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd](http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd) does not.
