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

docs: default values #986

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

asthamohta
Copy link
Collaborator

No description provided.

@asthamohta asthamohta requested a review from a team as a code owner January 10, 2025 07:06
@asthamohta asthamohta requested review from darshan-sj and VardhanThigle and removed request for a team January 10, 2025 07:06
Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.72%. Comparing base (23148db) to head (4584cfc).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #986   +/-   ##
=======================================
  Coverage   46.72%   46.72%           
=======================================
  Files         169      169           
  Lines       22810    22810           
  Branches      559      559           
=======================================
  Hits        10659    10659           
  Misses      11546    11546           
  Partials      605      605           
Components Coverage Δ
backend-apis 45.80% <ø> (ø)
backend-library 52.94% <ø> (ø)
cli 4.92% <ø> (ø)
frontend 34.47% <ø> (ø)

@@ -32,6 +32,7 @@ Spanner migration tool scans through the generated spanner schema and notifies t
## Errors

- Detection of unsupported check constraints in spanner.
- Detection of unsupported default values in spanner.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this be a warning or an error? Are we stopping the user from proceeding with the migration in case a default value isn't supported?

While Spanner supports default values, Spanner migration tool currently does not support translating source `DEFAULT` constraints to Spanner `DEFAULT` constraints. We drop the `DEFAULT` MySQL constraint during conversion.
It can be manually added to the DDL via an `ALTER TABLE` command.
Spanner Migration Tool will migrate all valid `DEFAULT` values from MySQL source automatically
to Spanner and drop invalid `DEFAULT` constraints.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should mention that a warning will be displayed for dropped/invalid DEFAULT constraints. Also I think calling existing default constraints invalid is wrong, we should say that we map 1:1 and in case the syntax is invalid for spanner we drop the constraint

@@ -28,7 +28,7 @@ Users can view detailed information for a table by selecting it from the **Spann

Column tab provides information on the columns that are a part of the selected table. It also provides the option to edit the column wherein a user can modify a column name, delete a column, change the data type of the column, add auto-generation to the column or modify the null property of the column. Once the user is done with required modifications, they can click on **SAVE & CONVERT **and the update would reflect in the session file and across all the components in the database.

![](https://services.google.com/fh/files/misc/column-info-edit.png)
![](https://services.google.com/fh/files/misc/dv1.png)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please add an attachment in the PR description of how this page looks in the new png?

@@ -28,7 +28,7 @@ Users can view detailed information for a table by selecting it from the **Spann

Column tab provides information on the columns that are a part of the selected table. It also provides the option to edit the column wherein a user can modify a column name, delete a column, change the data type of the column, add auto-generation to the column or modify the null property of the column. Once the user is done with required modifications, they can click on **SAVE & CONVERT **and the update would reflect in the session file and across all the components in the database.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section needs to be updated with latest screenshots apart from the one updated and details around modifying/adding default values: https://googlecloudplatform.github.io/spanner-migration-tool/ui/schema-conv/spanner-draft.html#column

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants