Skip to content

Plan wants to change a column that hasn't changed. #283

@Thxsoft64

Description

@Thxsoft64

Consider this dump (I added Create Extension so it would work witout claiming they didn't exist):

--
-- pgschema database dump
--

-- Dumped from database version PostgreSQL 17.7
-- Dumped by pgschema version 1.6.2

CREATE EXTENSION IF NOT EXISTS "citext" SCHEMA public;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp" SCHEMA public;
CREATE EXTENSION IF NOT EXISTS pg_trgm SCHEMA public;

CREATE TABLE IF NOT EXISTS geotab_database (
    name citext NOT NULL,
    active boolean DEFAULT true NOT NULL,
    id uuid DEFAULT uuid_generate_v1mc(),
    api_password text,
    CONSTRAINT geotab_database_pk PRIMARY KEY (id)
);

Then run plan, I get this:

Plan: 1 to modify.

Summary by type:
  tables: 1 to modify

Tables:
  ~ geotab_database
    ~ id (column)

DDL to be executed:
--------------------------------------------------

ALTER TABLE geotab_database ALTER COLUMN id SET DEFAULT public.uuid_generate_v1mc();

Changing to id uuid DEFAULT public.uuid_generate_v1mc() didn't fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions