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

Odd formatting for ALTER TABLE statements #1198

Open
1 task done
DavidS-ovm opened this issue Aug 3, 2023 · 0 comments
Open
1 task done

Odd formatting for ALTER TABLE statements #1198

DavidS-ovm opened this issue Aug 3, 2023 · 0 comments

Comments

@DavidS-ovm
Copy link

Describe the bug

Formatted result:

-- Modify "apps" table
ALTER TABLE "public"."apps"
ALTER COLUMN "created_at"
SET NOT NULL,
    ALTER COLUMN "created_at"
SET DEFAULT now(),
    ALTER COLUMN "updated_at"
SET NOT NULL,
    ALTER COLUMN "updated_at"
SET DEFAULT now();

Expected behavior

-- Modify "apps" table
ALTER TABLE "public"."apps"
    ALTER COLUMN "created_at" SET NOT NULL,
    ALTER COLUMN "created_at" SET DEFAULT now(),
    ALTER COLUMN "updated_at" SET NOT NULL,
    ALTER COLUMN "updated_at" SET DEFAULT now();

or

-- Modify "apps" table
ALTER TABLE "public"."apps"
    ALTER COLUMN "created_at"
        SET NOT NULL,
    ALTER COLUMN "created_at" 
        SET DEFAULT now(),
    ALTER COLUMN "updated_at" 
        SET NOT NULL,
    ALTER COLUMN "updated_at" 
        SET DEFAULT now();

Desktop (please complete the following information):

  • SQLTools Version: v0.28.0
  • VS Code Version: 1.80.2
  • OS: Debian
  • Driver:
    • PostgreSQL/Redshift
  • Database version: postgres:14.6-alpine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants