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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/data-types/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ and `ON UPDATE` actions, we drop them.

## Default Values

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


## Check Constraints

Expand Down
4 changes: 2 additions & 2 deletions docs/data-types/postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ Spanner doesn't support `ON DELETE` and `ON UPDATE` actions, so we drop these.

## Default Values

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.

## Secondary Indexes

Expand Down
1 change: 1 addition & 0 deletions docs/ui/schema-conv/issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?

- Data type mismatch of referenced column in check constraints.
- Referenced column in check constraints not found.
- Function referenced in check constraints is not found.
Expand Down
2 changes: 1 addition & 1 deletion docs/ui/schema-conv/spanner-draft.md
Original file line number Diff line number Diff line change
Expand Up @@ -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


![](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?


#### Add Column

Expand Down
Loading