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

PostgreSQL table with enum column and default value #286

Closed
foarsitter opened this issue Sep 28, 2024 · 3 comments
Closed

PostgreSQL table with enum column and default value #286

foarsitter opened this issue Sep 28, 2024 · 3 comments
Assignees

Comments

@foarsitter
Copy link

Thank you for your beautiful piece of work!

Parsing a table with an enum column with a default results in a missing table. Removing the default solves this problem.

Here is a minimum viable DDL:

CREATE TYPE public.blog_categories_visibility AS ENUM (
    'public',
    'protected',
    'private'
);

CREATE TABLE public.blog_categories (
    id integer NOT NULL,
    client_id integer,
    name character varying(255),
    slug character varying(255),
    color character varying(16),
    published boolean DEFAULT true NOT NULL,
    visibility public.blog_categories_visibility DEFAULT 'public'::public.blog_categories_visibility NOT NULL,
    filter_id integer
);

Thanks again!

@xnuinside
Copy link
Owner

xnuinside commented Sep 30, 2024

@foarsitter thanks for opening the issue, will be fixed in version 1.7.0, working on it

@xnuinside xnuinside self-assigned this Sep 30, 2024
@xnuinside
Copy link
Owner

@foarsitter released in version 1.7.0 #287 https://pypi.org/project/simple-ddl-parser/1.7.0/ . Thanks for opening the issue, if will be needed anything else - feel free to open new one

@foarsitter
Copy link
Author

Thanks for you quick action!

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

No branches or pull requests

2 participants