{"id":2483,"date":"2015-07-25T19:57:06","date_gmt":"2015-07-25T19:57:06","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=2483"},"modified":"2015-07-25T19:57:06","modified_gmt":"2015-07-25T19:57:06","slug":"liquibase-autoincrement-startwith-example","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/liquibase-autoincrement-startwith-example\/","title":{"rendered":"Liquibase autoIncrement startWith example"},"content":{"rendered":"<p>Liquibase doesn&#8217;t seem to have a command line option to let you set the start points on autoIncrement fields when you generate patches, but you can fix this easily by adding &#8220;startWith&#8221; after the fact (useful for a database migration):<\/p>\n<pre lang=\"xml\">\n<changeSet author=\"gary\" id=\"1437853066645-52\">\n  <createTable tableName=\"messages\">\n    <column autoIncrement=\"true\" startWith=\"150000\" name=\"Id\" type=\"bigint\">\n      <constraints primaryKey=\"true\" primaryKeyName=\"pk_messages\">\n    <\/column>\n  <\/createTable>\n<\/changeSet>\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Liquibase doesn&#8217;t seem to have a command line option to let you set the start points on autoIncrement fields when you generate patches, but you can fix this easily by adding &#8220;startWith&#8221; after the fact (useful for a database migration):<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4,6],"tags":[160,340,524],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/2483"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=2483"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/2483\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=2483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=2483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=2483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}