# Liquibase 'valueSequenceNext' not working with Snowflake

**URL:** <https://forum.liquibase.org/t/liquibase-valuesequencenext-not-working-with-snowflake/8266>\
**Category:** General Discussion\
**Created:** [May 24, 2023, 9:56pm UTC](https://forum.liquibase.org/t/liquibase-valuesequencenext-not-working-with-snowflake/8266 "2023-05-24T21:56:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![isao](https://avatars.discourse-cdn.com/v4/letter/i/67e7ee/32.png) [@isao](https://forum.liquibase.org/u/isao)\
**Post date:** [May 24, 2023, 9:56pm UTC](https://forum.liquibase.org/t/liquibase-valuesequencenext-not-working-with-snowflake/8266/1 "2023-05-24T21:56:12Z")

</div>

We are running into an issue with the Liquibase when trying to use the ‘update’ ([update](https://docs.liquibase.com/change-types/update.html)) change type. We need to update an existing database column to get the values from a sequence and the attribute ‘valueSequenceNext’ seems to be an appropriate choice to accomplish this

- changeSet:  
id: 1  
changes:  
- update:  
tableName: table\_name  
columns:  
- column:  
name: column\_name  
valueSequenceNext: SEQUENCE\_NAME

The above causes the exception below.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/liquibase1/original/1X/acab902c7eb03f6c2b9169086459558be5d45204.jpeg)

it seems like liquibase is looking for the string ‘sequenceNextValueFunction’ definition but it is missing for Snowflake.

```auto
public class SnowflakeDatabase extends AbstractJdbcDatabase {
    public static final String PRODUCT_NAME = "Snowflake";
    private Set<String> systemTables = new HashSet();
    private Set<String> systemViews = new HashSet();

    public SnowflakeDatabase() {
        super.setCurrentDateTimeFunction("current_timestamp::timestamp_ntz");
        super.unmodifiableDataTypes.addAll(Arrays.asList("integer", "bool", "boolean", "int4", "int8", "float4", "float8", "numeric", "bigserial", "serial", "bytea", "timestamptz"));
        super.unquotedObjectsAreUppercased = true;
        super.addReservedWords(this.getDefaultReservedWords());
        super.defaultAutoIncrementStartWith = BigInteger.ONE;
        super.defaultAutoIncrementBy = BigInteger.ONE;
    }

```

But other database has it

```auto
    public H2Database() {
        super.unquotedObjectsAreUppercased = true;
        super.setCurrentDateTimeFunction("NOW()");
        this.dateFunctions.add(new DatabaseFunction("CURRENT_DATE"));
        this.dateFunctions.add(new DatabaseFunction("CURDATE"));
        this.dateFunctions.add(new DatabaseFunction("SYSDATE"));
        this.dateFunctions.add(new DatabaseFunction("TODAY"));
        this.dateFunctions.add(new DatabaseFunction("CURRENT_TIME"));
        this.dateFunctions.add(new DatabaseFunction("CURTIME"));
        this.dateFunctions.add(new DatabaseFunction("CURRENT_TIMESTAMP"));
        this.dateFunctions.add(new DatabaseFunction("NOW"));
        super.sequenceNextValueFunction = "NEXTVAL('%s')"; <----

    }

```

Any workaround or suggestions to resolve this issue ?

Thanks

-Isao
