cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.09k stars 3.8k forks source link

sql: Alter Column Type general not supported if col is part of index #47636

Open RichardJCai opened 4 years ago

RichardJCai commented 4 years ago

Currently Alter Column Type general (for alter column requiring a rewrite of the data on disk) is only supported for columns that are not part of an index.

Epic CRDB-25314 Jira issue: CRDB-4390

clintonb commented 1 year ago

The lack of support for this functionality makes it impossible to use the Django backend with any project that either needs to modify a column in the future, or depends on third-party apps with migrations that modify indexed columns.

I'm quite disappointed that I spent time modifying my project only for it to fail. These limitations really should be called out someplace prominent. There is no mention at https://www.cockroachlabs.com/docs/stable/deploy-app-gcr.html.

dickermoshe commented 1 year ago

Is any work being done on this ? What can Django developers do to get this issue prioritized ?

ajwerner commented 1 year ago

We are hard at work to rewrite the entire schema change infrastructure to make this possible. I'm hopeful we'll be able to address this, at least for cases where the schema change is not run as part of an explicit transaction (BEGIN; ...; COMMIT), in 23.1 (Spring '23). Until all of the schema changes are implemented in the new schema changer, due to the need to know when the transaction starts which implementation to use, we'll not be using the new infrastructure by default.

NADOOITChristophBa commented 1 year ago

Any progress on this? I just encountered this and fear that this is a problem that I will have to move for.

dickermoshe commented 1 year ago

@ajwerner Could you please provide an updated timeline?

vyaesop commented 7 months ago

I changed Charfield to TextField and it worked fine, Hope this helps :)

sgang007 commented 4 months ago

Any update on this ? Django FCM package has migrations which are not running due to this. I cannot integrate firebase cloud messaging with cockroach DB due to this issue.

kcoderhtml commented 1 month ago

I'm running into this right now too; it would be really helpful to get this implemented asap as this is a dealbreaker for any project that needs migration support