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

move CREATE TABLE phrases from reservedClauses to onelineClauses #688

Merged

Conversation

DerTimonius
Copy link
Contributor

Description

This PR moves the CREATE TABLE keyphrase from the reservedClauses array to onelineClauses. This results in different formatting:

Before:

create table
  profiles (
    id bigint primary key,
    name text not null,
    dob date
  );

After:

create table profiles (
  id bigint primary key,
  name text not null,
  dob date
);

The tests that were affected by the change are also fixed as part of this PR.

closes #495

Copy link

codesandbox-ci bot commented Dec 6, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@nene
Copy link
Collaborator

nene commented Dec 6, 2023

Thanks!

@nene nene merged commit b64a3e9 into sql-formatter-org:master Dec 6, 2023
2 checks passed
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 this pull request may close these issues.

Place create table and table name in the same line
2 participants