Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgroll prefixes remain on index names after migration is completed #571

Closed
agedemenli opened this issue Jan 7, 2025 · 0 comments · Fixed by #572
Closed

pgroll prefixes remain on index names after migration is completed #571

agedemenli opened this issue Jan 7, 2025 · 0 comments · Fixed by #572
Assignees

Comments

@agedemenli
Copy link
Contributor

For CREATE TABLE operation,
Example below:

postgres=# \d+ customers
                                                Table "public.customers"
 Column │          Type          │ Collation │ Nullable │ Default │ Storage  │ Compression │ Stats target │ Description
────────┼────────────────────────┼───────────┼──────────┼─────────┼──────────┼─────────────┼──────────────┼─────────────
 id     │ integer                │           │ not null │         │ plain    │             │              │
 name   │ character varying(255) │           │ not null │         │ extended │             │              │
 bio    │ text                   │           │          │         │ extended │             │              │
Indexes:
    "_pgroll_new_customers_pkey" PRIMARY KEY, btree (id)
    "_pgroll_new_customers_name_key" UNIQUE CONSTRAINT, btree (name)
Access method: heap

I guess it's not because we name them like this, but instead because they automatically get their names from the table name. We should either consider renaming them after all is done; or maybe just go with the original name, as there's no point for using a temporary name when creating a table from scratch, so that indexes will get their names without the prefix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant