-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
workload/schemachange: columnIsDependedOn not seeing FKs #127286
Comments
could we get it from the json representation? example here
|
ah actually -- this might be a case of me jumping the gun
there could just be something wrong with our query -- checking rn |
Is the issue that our query doesn't look at if the column we are trying to drop is stored? in this case, we create a unique index
that is on col1_w1_3 -- which has a FK ref back onto itself:
|
This was suggested; we might have to tweak it:
|
Previously, drop column support was disabled because we did not properly detect if a column was referenced by foreign keys. This patch adds logic to detect if a column is in use by a foreign key. Fixes: cockroachdb#127286 Release note: None
Previously, drop column support was disabled because we did not properly detect if a column was referenced by foreign keys. This patch adds logic to detect if a column is in use by a foreign key. Fixes: cockroachdb#127286 Release note: None
Previously, drop column support was disabled because we did not properly detect if a column was referenced by foreign keys. This patch adds logic to detect if a column is in use by a foreign key. Fixes: cockroachdb#127286 Release note: None
Previously, drop column support was disabled because we did not properly detect if a column was referenced by foreign keys. This patch adds logic to detect if a column is in use by a foreign key. Fixes: cockroachdb#127286 Release note: None
Previously, drop column support was disabled because we did not properly detect if a column was referenced by foreign keys. We also did not properly detect if removing a column would remove indexes needed to enforce other foreign keys. This patch adds logic if a column or any indexes referencing this column are used by foreign keys. Additionally, other operations are tweaked to allow tables without columns (i.e. all columns dropped only leaving rowid). Fixes: cockroachdb#127286 Release note: None <pkg>: <short description - lowercase, no final period> <what was there before: Previously, ...> <why it needed to change: This was inadequate because ...> <what you did about it: To address this, this patch ...>
Previously, drop column support was disabled because we did not properly detect if a column was referenced by foreign keys. We also did not properly detect if removing a column would remove indexes needed to enforce other foreign keys. This patch adds logic if a column or any indexes referencing this column are used by foreign keys. Additionally, other operations are tweaked to allow tables without columns (i.e. all columns dropped only leaving rowid). Fixes: cockroachdb#127286
128137: workload/schemachange: enable drop column support r=fqazi a=fqazi Previously, drop column support was disabled because we did not properly detect if a column was referenced by foreign keys. We also did not properly detect if removing a column would remove indexes needed to enforce other foreign keys. This patch adds logic if a column or any indexes referencing this column are used by foreign keys. Fixes: #127286 Release note: None Co-authored-by: Faizan Qazi <[email protected]>
A simple repro on master-ish shows that the forward_dependencies table looks like:
during the call to
dependedonby_details
for crdb_internal.forward_dependencies. Let's use something elseJira issue: CRDB-40354
Epic CRDB-19168
The text was updated successfully, but these errors were encountered: