Skip to content

Commit

Permalink
Removing dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
marccampbell committed Apr 11, 2020
1 parent e528fb9 commit 65d0af1
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions pkg/database/postgres/alter.go
Expand Up @@ -95,25 +95,6 @@ func AlterColumnStatements(tableName string, primaryKeys []string, desiredColumn

// too much complexity below!
if column.Constraints != nil || existingColumn.Constraints != nil {
// // Add not null
// if column.Constraints != nil && column.Constraints.NotNull != nil && *column.Constraints.NotNull == true {
// // Ensure that there is a not null constraint on this column

// if existingColumn.Constraints == nil {
// existingColumn.Constraints = &types.ColumnConstraints{}
// }

// if existingColumn.Constraints.NotNull != nil {
// // Change the constraint
// if *existingColumn.Constraints.NotNull == false {
// changes = append(changes, fmt.Sprintf("%s set not null", alterStatement))
// }
// } else {
// // Add the constraint

// }
// }

isPrimaryKey := false
for _, primaryKey := range primaryKeys {
if column.Name == primaryKey {
Expand Down

0 comments on commit 65d0af1

Please sign in to comment.