createSequence wraps with commas the name of the sequence: public."sequenceName"

Description

The following createSequence bundled change:

<createSequence sequenceName="employeeSeq"/>

Generates the following SQL output:

CREATE SEQUENCE public."employeeSeq";

Which creates a sequence named public."employeeSeq" instead of public.employeeSeq

Database change log example:

<?xml version="1.0" encoding="UTF-8"?> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd"> <changeSet id="create-employee-sequence" author="bob"> <createSequence sequenceName="employeeSeq"/> </changeSet> </databaseChangeLog>

Environment

Ubuntu, java 1.7.0, postgresql 9.1

Activity

Show:

Daniel Baleato July 4, 2014 at 11:20 AM

This seems to be the desired behaviour.

Postgresql converts every name to lowercase unless you specify not to by wrapping it between quotes: "ACaseSensitiveName".
If the names contain capital letters liquibase adds this "" for you when generating the SQL.

With capital letters: Employee

<createTable tableName="Employee"> <column name="id" type="bigint"/> </createTable>

Generates:

CREATE TABLE public."Employee" (id BIGINT);

Without capital letters: employee

<createTable tableName="employee"> <column name="id" type="bigint"/> </createTable>

Generates:

CREATE TABLE public.employee (id BIGINT);

I guess by configuring liquibase to use a different quoting strategy I may be able to make it work as I intended, ignoring uppercase.

Won't Fix

Details

Reporter

Affects versions

Priority

Created July 2, 2014 at 1:16 PM
Updated July 4, 2014 at 11:20 AM
Resolved July 4, 2014 at 11:20 AM

Flag notifications