Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

SqlPackage CREATE function casing issues #40

Open
CodeAngry opened this issue Mar 17, 2020 · 0 comments
Open

SqlPackage CREATE function casing issues #40

CodeAngry opened this issue Mar 17, 2020 · 0 comments

Comments

@CodeAngry
Copy link

Updated SqlPackage 140 x86 to 150 x64 with a local install of SqlServer 2019 Developer.

Publishing SSDT project via SqlPackage 150 alters all my functions and nothing else, in consecutive publishes, when code does not change. Before I used to publish via SqlPackage 140 with no issues at all. After update to SqlPackage 150, functions alter on every publish, regardless of changes.

I always use(d) lower-case create function but Schema Compare tells me CREATE function is expected. While no other difference is pointed out. Also, I use create table/view/procedure/trigger... and all these have no issues (if I don't change any code, publishing publishes nothing), but now only functions are altered.

SqlPackage 140 was always quirky but I learned to work around:

  • don't use iif, use case to avoid any re-creates
  • keep entire case when then ... end on a single line no matter how long it is
  • always wrap in parenthesis (default values) and (computed fields)
  • name all constraints (pks, uniques, checks) to avoid drop/re-create
  • ...there are some more I'm forgetting right now...

What do I do about this one?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant