Skip to content

Make "smart defaults" actually use column default constraints #808

Description

@Fasteroid

Is your feature request related to a problem?

This is probably a feature request, but could be interpreted as a bug. It's certainly not intuitive.

Please describe.

Today I discovered "smart defaults" when trying to migrate some columns from nullable to not nullable. With a name like "smart defaults", I expected this feature would make its best effort to replace nulls with a sensible default, I.E. the new DEFAULT constraints I was adding to said columns.

It didn't do that, and now my columns now have the wrong values. Boooooo!

Describe the solution you'd like

Use the value of DEFAULT constraints (specifically those which are added in the same publish run) to populate smart defaults.

Describe alternatives you've considered

Pre/post deployment scripts are an option, but that introduces additional state that isn't directly tracked by the project. The whole reason I like this pipeline is for its ability to sync schema in a few clicks without much thought.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions