-
Notifications
You must be signed in to change notification settings - Fork 17
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
Improve readability with new lines #18
Comments
@dcrystalj Could you please share what your migrations look like and what your desired state is? |
Sorry I did not provide example. The issue with readability is only with long lines being too long. Here are my real examples: ALTER TABLE "public"."raw_activity" ADD COLUMN "order_plan" integer NOT NULL, ADD COLUMN "order_counter" integer NOT NULL, ADD COLUMN "finish_setup_date" timestamptz NULL, ADD COLUMN "finish_setup_time" timestamptz NULL; CONSTRAINT "fk_salary_variable_log_salary_person" FOREIGN KEY ("salary_person_id") REFERENCES "public"."salary_person" ("id") ON UPDATE NO ACTION ON DELETE NO ACTION, |
@dcrystalj Ah, you're right. It would be better if the formatter could produce something like: ALTER TABLE "public"."raw_activity"
ADD COLUMN "order_plan" INTEGER NOT NULL,
ADD COLUMN "order_counter" INTEGER NOT NULL,
ADD COLUMN "finish_setup_date" TIMESTAMPTZ NULL,
ADD COLUMN "finish_setup_time" TIMESTAMPTZ NULL; instead of a long line of SQL. But sadly, there is no option for this formatting style at the moment. I'll let you know if an improvement on it is released. |
thanks @rotemtam , but it seems like a slightly different case. Intended sql works for |
My atlas.hcl
Migrations created are quite unreadable. Is there a way to have new line in front of
ADD column
orALTER COLUMN
?The text was updated successfully, but these errors were encountered: