Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
RichardJCai opened this issue Apr 18, 2020 · 8 comments
Open
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@RichardJCai
Copy link
Contributor

RichardJCai commented Apr 18, 2020

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-44826
Jira issue: CRDB-4390

@RichardJCai RichardJCai self-assigned this Apr 21, 2020
@RichardJCai RichardJCai added A-sql-pgcompat Semantic compatibility with PostgreSQL C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) labels Apr 21, 2020
@exalate-issue-sync exalate-issue-sync bot added the T-sql-schema-deprecated Use T-sql-foundations instead label Oct 21, 2022
@clintonb
Copy link

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
Copy link

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

@ajwerner
Copy link
Contributor

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.

@exalate-issue-sync exalate-issue-sync bot added T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) and removed T-sql-schema-deprecated Use T-sql-foundations instead labels May 10, 2023
@NADOOITChristophBa
Copy link

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

@dickermoshe
Copy link

@ajwerner
Could you please provide an updated timeline?

@vyaesop
Copy link

vyaesop commented Mar 24, 2024

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

@sgang007
Copy link

sgang007 commented Jul 4, 2024

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.

@taciturnaxolotl
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
None yet
Development

No branches or pull requests

8 participants