feat(migration): add support for altering column nullability

* Implement ExecuteAlterColumnNullability function
* Create alter_column_nullability template
* Add test for altering column nullability behavior
This commit is contained in:
Hein
2026-08-14 14:10:21 +02:00
parent d44945b475
commit 97139723c9
4 changed files with 86 additions and 0 deletions
@@ -0,0 +1,7 @@
{{- if .NotNull -}}
ALTER TABLE {{qual_table .SchemaName .TableName}}
ALTER COLUMN {{quote_ident .ColumnName}} SET NOT NULL;
{{- else -}}
ALTER TABLE {{qual_table .SchemaName .TableName}}
ALTER COLUMN {{quote_ident .ColumnName}} DROP NOT NULL;
{{- end -}}