liquibase.harness.change.expectedSql.postgresql.9.dropCamelCasePrimaryKey.sql Maven / Gradle / Ivy
CREATE TABLE public."camelCase" (id SERIAL NOT NULL, CONSTRAINT "camelCase_pkey" PRIMARY KEY (id))
DO $$ DECLARE constraint_name varchar
BEGIN
SELECT tc.CONSTRAINT_NAME into strict constraint_name
FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc
WHERE CONSTRAINT_TYPE = 'PRIMARY KEY'
AND TABLE_NAME = 'camelCase' AND TABLE_SCHEMA = 'public'
EXECUTE 'alter table public."camelCase" drop constraint "' || constraint_name || '"'
END $$
© 2015 - 2024 Weber Informatics LLC | Privacy Policy