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

SqlPackage CREATE function casing issues #40

@CodeAngry

Description

@CodeAngry

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions