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

Updating version of msprod #969

Merged

Conversation

VardhanThigle
Copy link
Collaborator

@VardhanThigle VardhanThigle commented Dec 19, 2024

Fixes b/85117347

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to README are included in PR - N/A

@VardhanThigle VardhanThigle force-pushed the msprod-version branch 3 times, most recently from 467e22b to 9d04801 Compare December 19, 2024 19:35
@VardhanThigle VardhanThigle force-pushed the msprod-version branch 9 times, most recently from 90c72cb to e115394 Compare December 19, 2024 20:38
@VardhanThigle VardhanThigle changed the title [Draft] Updating version of msprod Updating version of msprod Dec 19, 2024
@VardhanThigle VardhanThigle marked this pull request as ready for review December 19, 2024 20:51
@VardhanThigle VardhanThigle requested a review from a team as a code owner December 19, 2024 20:51
@VardhanThigle VardhanThigle merged commit 780b0fb into GoogleCloudPlatform:master Dec 20, 2024
4 checks passed
taherkl pushed a commit to ollionorg/spanner-migration-tool-fork that referenced this pull request Dec 20, 2024
asthamohta added a commit that referenced this pull request Dec 26, 2024
* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

* Updating version of msprod (#969)

* fix(deps): update module golang.org/x/net to v0.33.0 [security] (#967)

Co-authored-by: Vardhan Vinay Thigle <[email protected]>

* feat: APIs for Backend Changes for Default Values (#965)

* backend apis

* linting

* comment changes

* comment changes

* feat: default value for mysql source  (#963)

* source dv

* test fix

* change

* comment changes

* test fix

* change

* fix github v

* change

* Check constraint backend (#9)

Backend Support for Check Constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* removed duplicate function

* Fixed UT

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: Vardhan Vinay Thigle <[email protected]>
Co-authored-by: Mend Renovate <[email protected]>
Co-authored-by: Astha Mohta <[email protected]>
akashthawaitcc added a commit to ollionorg/spanner-migration-tool-fork that referenced this pull request Dec 27, 2024
* chore(deps): update dependency jasmine-core to ~5.5.0 (GoogleCloudPlatform#953)

Co-authored-by: Vardhan Vinay Thigle <[email protected]>

* removed duplicate function

* Fixed UT

* feat: make spanner config mandatory for schema migration (GoogleCloudPlatform#970)

* changes

* change

* change

* chore(deps): update gcr.io/cloud-spanner-emulator/emulator docker tag to v1.5.28 (GoogleCloudPlatform#974)

* chore(deps): update dependency @types/node to v20.17.10 (GoogleCloudPlatform#973)

Co-authored-by: Vardhan Vinay Thigle <[email protected]>

* Add Support for Check Constraint - Backend code changes (GoogleCloudPlatform#945)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

* Updating version of msprod (GoogleCloudPlatform#969)

* fix(deps): update module golang.org/x/net to v0.33.0 [security] (GoogleCloudPlatform#967)

Co-authored-by: Vardhan Vinay Thigle <[email protected]>

* feat: APIs for Backend Changes for Default Values (GoogleCloudPlatform#965)

* backend apis

* linting

* comment changes

* comment changes

* feat: default value for mysql source  (GoogleCloudPlatform#963)

* source dv

* test fix

* change

* comment changes

* test fix

* change

* fix github v

* change

* Check constraint backend (#9)

Backend Support for Check Constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* removed duplicate function

* Fixed UT

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: Vardhan Vinay Thigle <[email protected]>
Co-authored-by: Mend Renovate <[email protected]>
Co-authored-by: Astha Mohta <[email protected]>

* Check constraint backend (#9)

Backend Support for Check Constraint

* removed duplicate code after rebase

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

* feat: APIs for Backend Changes for Default Values (GoogleCloudPlatform#965)

* backend apis

* linting

* comment changes

* comment changes

* feat: default value for mysql source  (GoogleCloudPlatform#963)

* source dv

* test fix

* change

* comment changes

* test fix

* change

* fix github v

* change

* Check constraint backend (#9)

Backend Support for Check Constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* removed duplicate function

* Fixed UT

* Check constraint backend (#9)

Backend Support for Check Constraint

* removed duplicate code after rebase

* removed duplicate constants

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* updated the regrex for constraint name

* address the comment

* addressed the comment
1. change checkIfCcColumn to check in Spschema

* address the comment
1.Modify the checkIfCcColumn to handle pk and check constraint

* address the comment
1. when  interleave tab is shown 4 or 3

* fixed regular expression for check constraints name

* remove the node-sql-parser package

* handle check constraint without name.

* resolve the duplicate issue

* Check constraint backend (#9)

Backend Support for Check Constraint

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* fix: added regular exprression to match the exact column

* Added test case for the column rename for check constraint

* PR and UT fixes

* added the verification api integration and struct changes

* added the verification at connect button

* added the integration of expression api

* code fix for expression api implementation

* code fix for expression verification on initial call

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* fix the UT issue

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* Fixed unit test and code refactor

* fixed unit tests

* added source in conv object

* front-end ut fixed

* removed node sql parser import

* removed node dependencies

* rename handler

* added the generation of constraint name

* added dump flow

* added dump flow

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* remove the node-sql-parser package

* Check constraint backend (#9)

Backend Support for Check Constraint

* fixed PR comments

* fix: added regular exprression to match the exact column

* Added test case for the column rename for check constraint

* nit: doesCheckConstraintNameExist

* moved regex globally

* modify the query to fetch the check constraint

* added the verification api integration and struct changes

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* Fixed unit test and code refactor

* removed node dependencies

* added dump flow

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* remove the node-sql-parser package

* Check constraint backend (#9)

Backend Support for Check Constraint

* added the verification api integration and struct changes

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* removed node dependencies

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* remove the node-sql-parser package

* Check constraint backend (#9)

Backend Support for Check Constraint

* added the verification api integration and struct changes

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* removed node dependencies

* added UT

* address the comment
1. handle the unexpected error
2. resuse the code

* updated the table exist query for version8.0.16

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* address the comment
1.Modify the checkIfCcColumn to handle pk and check constraint

* rebase commit

* fixed regular expression for check constraints name

* remove the node-sql-parser package

* resolve the duplicate issue

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fix: added regular exprression to match the exact column

* Added test case for the column rename for check constraint

* reverted white spaces

* reverted white spaces

* added the verification api integration and struct changes

* added the integration of expression api

* code fix for expression api implementation

* code fix for expression verification on initial call

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* fixed unit tests

* front-end ut fixed

* removed node sql parser import

* removed node dependencies

* rename handler

* added the generation of constraint name

* added dump flow

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* remove the node-sql-parser package

* Check constraint backend (#9)

Backend Support for Check Constraint

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* fix: added regular exprression to match the exact column

* Added test case for the column rename for check constraint

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* moved regex globally

* modify the query to fetch the check constraint

* added the verification api integration and struct changes

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* Fixed unit test and code refactor

* removed node dependencies

* added dump flow

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* address the comment
1.Modify the checkIfCcColumn to handle pk and check constraint

* fixed regular expression for check constraints name

* remove the node-sql-parser package

* resolve the duplicate issue

* Check constraint backend (#9)

Backend Support for Check Constraint

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* moved regex globally

* modify the query to fetch the check constraint

* added the verification api integration and struct changes

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* fixed unit tests

* front-end ut fixed

* remove unwanted code

* removed node sql parser import

* removed node dependencies

* rename handler

* added the generation of constraint name

* added dump flow

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* address the comment
1.Modify the checkIfCcColumn to handle pk and check constraint

* fixed regular expression for check constraints name

* remove the node-sql-parser package

* resolve the duplicate issue

* Check constraint backend (#9)

Backend Support for Check Constraint

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* moved regex globally

* Fix UT

* modify the query to fetch the check constraint

* added the verification api integration and struct changes

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* fixed unit tests

* front-end ut fixed

* remove unwanted code

* removed node sql parser import

* removed node dependencies

* rename handler

* added the generation of constraint name

* added dump flow

* added UT

* address the comment
1. handle the unexpected error
2. resuse the code

* added mock for RefreshSpannerClient function

* addressed the comment and feedback

---------

Co-authored-by: Mend Renovate <[email protected]>
Co-authored-by: Vardhan Vinay Thigle <[email protected]>
Co-authored-by: taherkl <[email protected]>
Co-authored-by: Taher Lakdawala <[email protected]>
Co-authored-by: Astha Mohta <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>
akashthawaitcc added a commit to ollionorg/spanner-migration-tool-fork that referenced this pull request Dec 27, 2024
Support check constraint frontend (#22)

* chore(deps): update dependency jasmine-core to ~5.5.0 (GoogleCloudPlatform#953)

Co-authored-by: Vardhan Vinay Thigle <[email protected]>

* removed duplicate function

* Fixed UT

* feat: make spanner config mandatory for schema migration (GoogleCloudPlatform#970)

* changes

* change

* change

* chore(deps): update gcr.io/cloud-spanner-emulator/emulator docker tag to v1.5.28 (GoogleCloudPlatform#974)

* chore(deps): update dependency @types/node to v20.17.10 (GoogleCloudPlatform#973)

Co-authored-by: Vardhan Vinay Thigle <[email protected]>

* Add Support for Check Constraint - Backend code changes (GoogleCloudPlatform#945)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

* Updating version of msprod (GoogleCloudPlatform#969)

* fix(deps): update module golang.org/x/net to v0.33.0 [security] (GoogleCloudPlatform#967)

Co-authored-by: Vardhan Vinay Thigle <[email protected]>

* feat: APIs for Backend Changes for Default Values (GoogleCloudPlatform#965)

* backend apis

* linting

* comment changes

* comment changes

* feat: default value for mysql source  (GoogleCloudPlatform#963)

* source dv

* test fix

* change

* comment changes

* test fix

* change

* fix github v

* change

* Check constraint backend (#9)

Backend Support for Check Constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* removed duplicate function

* Fixed UT

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: Vardhan Vinay Thigle <[email protected]>
Co-authored-by: Mend Renovate <[email protected]>
Co-authored-by: Astha Mohta <[email protected]>

* Check constraint backend (#9)

Backend Support for Check Constraint

* removed duplicate code after rebase

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

* feat: APIs for Backend Changes for Default Values (GoogleCloudPlatform#965)

* backend apis

* linting

* comment changes

* comment changes

* feat: default value for mysql source  (GoogleCloudPlatform#963)

* source dv

* test fix

* change

* comment changes

* test fix

* change

* fix github v

* change

* Check constraint backend (#9)

Backend Support for Check Constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* removed duplicate function

* Fixed UT

* Check constraint backend (#9)

Backend Support for Check Constraint

* removed duplicate code after rebase

* removed duplicate constants

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* updated the regrex for constraint name

* address the comment

* addressed the comment
1. change checkIfCcColumn to check in Spschema

* address the comment
1.Modify the checkIfCcColumn to handle pk and check constraint

* address the comment
1. when  interleave tab is shown 4 or 3

* fixed regular expression for check constraints name

* remove the node-sql-parser package

* handle check constraint without name.

* resolve the duplicate issue

* Check constraint backend (#9)

Backend Support for Check Constraint

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* fix: added regular exprression to match the exact column

* Added test case for the column rename for check constraint

* PR and UT fixes

* added the verification api integration and struct changes

* added the verification at connect button

* added the integration of expression api

* code fix for expression api implementation

* code fix for expression verification on initial call

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* fix the UT issue

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* Fixed unit test and code refactor

* fixed unit tests

* added source in conv object

* front-end ut fixed

* removed node sql parser import

* removed node dependencies

* rename handler

* added the generation of constraint name

* added dump flow

* added dump flow

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* remove the node-sql-parser package

* Check constraint backend (#9)

Backend Support for Check Constraint

* fixed PR comments

* fix: added regular exprression to match the exact column

* Added test case for the column rename for check constraint

* nit: doesCheckConstraintNameExist

* moved regex globally

* modify the query to fetch the check constraint

* added the verification api integration and struct changes

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* Fixed unit test and code refactor

* removed node dependencies

* added dump flow

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* remove the node-sql-parser package

* Check constraint backend (#9)

Backend Support for Check Constraint

* added the verification api integration and struct changes

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* removed node dependencies

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* remove the node-sql-parser package

* Check constraint backend (#9)

Backend Support for Check Constraint

* added the verification api integration and struct changes

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* removed node dependencies

* added UT

* address the comment
1. handle the unexpected error
2. resuse the code

* updated the table exist query for version8.0.16

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* address the comment
1.Modify the checkIfCcColumn to handle pk and check constraint

* rebase commit

* fixed regular expression for check constraints name

* remove the node-sql-parser package

* resolve the duplicate issue

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fix: added regular exprression to match the exact column

* Added test case for the column rename for check constraint

* reverted white spaces

* reverted white spaces

* added the verification api integration and struct changes

* added the integration of expression api

* code fix for expression api implementation

* code fix for expression verification on initial call

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* fixed unit tests

* front-end ut fixed

* removed node sql parser import

* removed node dependencies

* rename handler

* added the generation of constraint name

* added dump flow

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* remove the node-sql-parser package

* Check constraint backend (#9)

Backend Support for Check Constraint

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* fix: added regular exprression to match the exact column

* Added test case for the column rename for check constraint

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* moved regex globally

* modify the query to fetch the check constraint

* added the verification api integration and struct changes

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* Fixed unit test and code refactor

* removed node dependencies

* added dump flow

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* address the comment
1.Modify the checkIfCcColumn to handle pk and check constraint

* fixed regular expression for check constraints name

* remove the node-sql-parser package

* resolve the duplicate issue

* Check constraint backend (#9)

Backend Support for Check Constraint

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* moved regex globally

* modify the query to fetch the check constraint

* added the verification api integration and struct changes

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* fixed unit tests

* front-end ut fixed

* remove unwanted code

* removed node sql parser import

* removed node dependencies

* rename handler

* added the generation of constraint name

* added dump flow

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* address the comment
1.Modify the checkIfCcColumn to handle pk and check constraint

* fixed regular expression for check constraints name

* remove the node-sql-parser package

* resolve the duplicate issue

* Check constraint backend (#9)

Backend Support for Check Constraint

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* moved regex globally

* Fix UT

* modify the query to fetch the check constraint

* added the verification api integration and struct changes

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* fixed unit tests

* front-end ut fixed

* remove unwanted code

* removed node sql parser import

* removed node dependencies

* rename handler

* added the generation of constraint name

* added dump flow

* added UT

* address the comment
1. handle the unexpected error
2. resuse the code

* added mock for RefreshSpannerClient function

* addressed the comment and feedback

---------

Co-authored-by: Mend Renovate <[email protected]>
Co-authored-by: Vardhan Vinay Thigle <[email protected]>
Co-authored-by: taherkl <[email protected]>
Co-authored-by: Taher Lakdawala <[email protected]>
Co-authored-by: Astha Mohta <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>
VivekY1098 added a commit to ollionorg/spanner-migration-tool-fork that referenced this pull request Dec 27, 2024
Added sample session and dump file

Added integration test for mysql check constraints

Support check constraint frontend (#22)

* chore(deps): update dependency jasmine-core to ~5.5.0 (GoogleCloudPlatform#953)

Co-authored-by: Vardhan Vinay Thigle <[email protected]>

* removed duplicate function

* Fixed UT

* feat: make spanner config mandatory for schema migration (GoogleCloudPlatform#970)

* changes

* change

* change

* chore(deps): update gcr.io/cloud-spanner-emulator/emulator docker tag to v1.5.28 (GoogleCloudPlatform#974)

* chore(deps): update dependency @types/node to v20.17.10 (GoogleCloudPlatform#973)

Co-authored-by: Vardhan Vinay Thigle <[email protected]>

* Add Support for Check Constraint - Backend code changes (GoogleCloudPlatform#945)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

* Updating version of msprod (GoogleCloudPlatform#969)

* fix(deps): update module golang.org/x/net to v0.33.0 [security] (GoogleCloudPlatform#967)

Co-authored-by: Vardhan Vinay Thigle <[email protected]>

* feat: APIs for Backend Changes for Default Values (GoogleCloudPlatform#965)

* backend apis

* linting

* comment changes

* comment changes

* feat: default value for mysql source  (GoogleCloudPlatform#963)

* source dv

* test fix

* change

* comment changes

* test fix

* change

* fix github v

* change

* Check constraint backend (#9)

Backend Support for Check Constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* removed duplicate function

* Fixed UT

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: Vardhan Vinay Thigle <[email protected]>
Co-authored-by: Mend Renovate <[email protected]>
Co-authored-by: Astha Mohta <[email protected]>

* Check constraint backend (#9)

Backend Support for Check Constraint

* removed duplicate code after rebase

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

* feat: APIs for Backend Changes for Default Values (GoogleCloudPlatform#965)

* backend apis

* linting

* comment changes

* comment changes

* feat: default value for mysql source  (GoogleCloudPlatform#963)

* source dv

* test fix

* change

* comment changes

* test fix

* change

* fix github v

* change

* Check constraint backend (#9)

Backend Support for Check Constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* removed duplicate function

* Fixed UT

* Check constraint backend (#9)

Backend Support for Check Constraint

* removed duplicate code after rebase

* removed duplicate constants

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* updated the regrex for constraint name

* address the comment

* addressed the comment
1. change checkIfCcColumn to check in Spschema

* address the comment
1.Modify the checkIfCcColumn to handle pk and check constraint

* address the comment
1. when  interleave tab is shown 4 or 3

* fixed regular expression for check constraints name

* remove the node-sql-parser package

* handle check constraint without name.

* resolve the duplicate issue

* Check constraint backend (#9)

Backend Support for Check Constraint

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* fix: added regular exprression to match the exact column

* Added test case for the column rename for check constraint

* PR and UT fixes

* added the verification api integration and struct changes

* added the verification at connect button

* added the integration of expression api

* code fix for expression api implementation

* code fix for expression verification on initial call

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* fix the UT issue

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* Fixed unit test and code refactor

* fixed unit tests

* added source in conv object

* front-end ut fixed

* removed node sql parser import

* removed node dependencies

* rename handler

* added the generation of constraint name

* added dump flow

* added dump flow

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* remove the node-sql-parser package

* Check constraint backend (#9)

Backend Support for Check Constraint

* fixed PR comments

* fix: added regular exprression to match the exact column

* Added test case for the column rename for check constraint

* nit: doesCheckConstraintNameExist

* moved regex globally

* modify the query to fetch the check constraint

* added the verification api integration and struct changes

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* Fixed unit test and code refactor

* removed node dependencies

* added dump flow

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* remove the node-sql-parser package

* Check constraint backend (#9)

Backend Support for Check Constraint

* added the verification api integration and struct changes

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* removed node dependencies

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* remove the node-sql-parser package

* Check constraint backend (#9)

Backend Support for Check Constraint

* added the verification api integration and struct changes

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* removed node dependencies

* added UT

* address the comment
1. handle the unexpected error
2. resuse the code

* updated the table exist query for version8.0.16

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* address the comment
1.Modify the checkIfCcColumn to handle pk and check constraint

* rebase commit

* fixed regular expression for check constraints name

* remove the node-sql-parser package

* resolve the duplicate issue

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fix: added regular exprression to match the exact column

* Added test case for the column rename for check constraint

* reverted white spaces

* reverted white spaces

* added the verification api integration and struct changes

* added the integration of expression api

* code fix for expression api implementation

* code fix for expression verification on initial call

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* fixed unit tests

* front-end ut fixed

* removed node sql parser import

* removed node dependencies

* rename handler

* added the generation of constraint name

* added dump flow

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* remove the node-sql-parser package

* Check constraint backend (#9)

Backend Support for Check Constraint

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* fix: added regular exprression to match the exact column

* Added test case for the column rename for check constraint

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* moved regex globally

* modify the query to fetch the check constraint

* added the verification api integration and struct changes

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* Fixed unit test and code refactor

* removed node dependencies

* added dump flow

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* address the comment
1.Modify the checkIfCcColumn to handle pk and check constraint

* fixed regular expression for check constraints name

* remove the node-sql-parser package

* resolve the duplicate issue

* Check constraint backend (#9)

Backend Support for Check Constraint

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* moved regex globally

* modify the query to fetch the check constraint

* added the verification api integration and struct changes

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* fixed unit tests

* front-end ut fixed

* remove unwanted code

* removed node sql parser import

* removed node dependencies

* rename handler

* added the generation of constraint name

* added dump flow

* Feat/fe check contraints (#10)

* Add the UI changes  for supporting check constraints

---------

Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: taherkl <[email protected]>

* address the comment

* address the comment
1.Modify the checkIfCcColumn to handle pk and check constraint

* fixed regular expression for check constraints name

* remove the node-sql-parser package

* resolve the duplicate issue

* Check constraint backend (#9)

Backend Support for Check Constraint

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* moved regex globally

* Fix UT

* modify the query to fetch the check constraint

* added the verification api integration and struct changes

* added partial unit test of verify check constraint expression

* refactored expression verfication api mock

* Test added for verification api

* Support check constraint backend (GoogleCloudPlatform#962)

* Check constraint backend (#9)

Backend Support for Check Constraint

* update api

* fix PR comment

* remove api call to while validating constraints

* Fixed db collation regex to remove collation name from the results

* renamed function name to formatCheckConstraints and added check if constraint name is empty

* fixed PR comments

* added test case for the empty check constraint name

* fix: added regular exprression to match the exact column

* fix: added regular expression to replace table name

* Added test case for the column rename for check constraint

* 1. Refactored GetConstraint function
2. Fixed inforschema unit tests

* added comment at handling case for check constraints

* reverted white spaces

* reverted white spaces

* nit: doesCheckConstraintNameExist

* added comments for doesCheckConstraintNameExist

* PR and UT fixes

* fix UT

* UT fix

* Removed isCheckConstraintsTablePresent function

* moved regex globally

* Fix UT

* fixed UT

* fixed handling of the constraints

* removed unused function

* added unit tests for incompatable name

* Combined unit tests

* added test case for the renaming column having substring of other column

* added the query changes which return distinct value

---------

Co-authored-by: taherkl <[email protected]>
Co-authored-by: Akash Thawait <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>

* fixed unit tests

* front-end ut fixed

* remove unwanted code

* removed node sql parser import

* removed node dependencies

* rename handler

* added the generation of constraint name

* added dump flow

* added UT

* address the comment
1. handle the unexpected error
2. resuse the code

* added mock for RefreshSpannerClient function

* addressed the comment and feedback

---------

Co-authored-by: Mend Renovate <[email protected]>
Co-authored-by: Vardhan Vinay Thigle <[email protected]>
Co-authored-by: taherkl <[email protected]>
Co-authored-by: Taher Lakdawala <[email protected]>
Co-authored-by: Astha Mohta <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>
Co-authored-by: Vivek Yadav <[email protected]>
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