github / github/gh-ost

ENUM to Varchar

Open
#1,188 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
13.6k
Forks
1.4k
Avg merge
2h 31m
Merged PRs (30d)
4

Description

Getting a weird error via gh-ost.
We are trying to alter a table from an ENUM to a Varchar
```
2022-10-13 04:47:38 FATAL Error 1048: Column 'payment_type' cannot be null; query=
update /* gh-ost `customcheckout`.`_purchase_gho` */
`customcheckout`.`_purchase_gho
```
This also happened when we were not changing this column. It's almost like gh-ost can't use the default data type on the new column.
```
ALTER TABLE purchase CHANGE COLUMN payment_type payment_type varchar(255) not null default 'CREDIT_CARD';
```

Any idea why gh-ost quietly fails? It seems like after a random time, it just fails.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.