go-gorm / sqlserver

GORM sqlserver driver
MIT License
55 stars 37 forks source link

refactor: distinguish between Unique and UniqueIndex #106

Closed black-06 closed 7 months ago

black-06 commented 1 year ago

What did this pull request do?

See https://github.com/go-gorm/gorm/issues/6381.

based on https://github.com/go-gorm/gorm/pull/6386

User Case Description

black-06 commented 1 year ago

I have a problem, When an index or constraint depends on the column, this column cannot exec ALTER. See https://stackoverflow.com/questions/19460912/the-object-df-is-dependent-on-column-changing-int-to-double/19461205#19461205

Our driver doesn't seem to think about it. What should I do? @a631807682

a631807682 commented 1 year ago

I have a problem, When an index or constraint depends on the column, this column cannot exec ALTER. See stackoverflow.com/questions/19460912/the-object-df-is-dependent-on-column-changing-int-to-double/19461205#19461205

Our driver doesn't seem to think about it. What should I do?

In this case, we need to modify the constraint or index first, but since we didn't support it before, we don't need to support it in this PR (may need to create another PR to fix it)

black-06 commented 7 months ago

It still has some problems which I'm fixing

After testing, it works well with https://github.com/go-gorm/gorm/pull/6822