Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DataJuggler opened this issue Mar 23, 2022 · 0 comments
Open

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

DataJuggler opened this issue Mar 23, 2022 · 0 comments

Comments

@DataJuggler
Copy link
Owner

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.

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

No branches or pull requests

1 participant