Skip to content

Generate Scripts - Alter Table - Add Column has to be null #3

@DataJuggler

Description

@DataJuggler

My Generate Scripts code was based on the schema, not based on the rules of what it takes to add a column to a table.

I will update this soon.

Problem, if a table has a new field to add, and the new fields does not allow nulls, I generate this:

Alter Table [TableName]
Add [ColumnName] not null

It needs to be:

Alter Table [TableName]
Add [ColumnName] null

Then you can update the column with a default value, and change it yourself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions