bikeshedder / tusker

PostgreSQL migration management tool
The Unlicense
208 stars 17 forks source link

Statement Keyword Casing #14

Closed hicaro closed 2 years ago

hicaro commented 2 years ago

I'd like to first thank the contributors here. Tusker is awesome! I use it on a daily basis and it has been a great tool on my toolbelt.

I have a minor enhancement request to make. I've noticed that the statement casings are not consistent when generating the diff. Some statements have keywords all upper case, all lower case, or a mixture of both.

For instance:

CREATE UNIQUE INDEX some_table_pkey ON some_table USING btree (id);

alter table "some_table" add constraint "some_table_pkey" PRIMARY KEY using index "some_table_pkey";

alter table "some_other_table" alter column "some_column" set not null;

It would be great if all keywords in generated statements are consistent. Ideally, but not necessary, it would be great to have a config to either use upper or lower case to fit the developer's preference.

bikeshedder commented 2 years ago

The diff is generated using the migra library. An issue regarding those inconsistencies is already reported in the migra repository:

hicaro commented 2 years ago

@bikeshedder thank you! It seems their issue has been stale for a while. Good to know it is on the radar though.

bikeshedder commented 2 years ago

I'm going to close this issue as there is nothing that can be done in tusker to fix that.