Skip to content

Commit

Permalink
Disabled the feature by default
Browse files Browse the repository at this point in the history
  • Loading branch information
sanyamsinghal committed Feb 20, 2025
1 parent 3b0589b commit b756152
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions migtests/tests/oracle/co-db/fix-schema
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ pushd ${EXPORT_DIR}/schema
echo "Delete all views."
echo "" > views/view.sql

# removing typecase to json for bytea column(unsupported) so that CREATE TABLE succeeds
# sed -i '/CONSTRAINT products_json_c CHECK/s/::pg_catalog\.json//g' sample2.sql

#Deleting the following line as the contraint creation blocks the import schema
sed -i '/ALTER TABLE products ADD CONSTRAINT products_json_c CHECK ( (CASE WHEN product_details::json IS NULL THEN true ELSE true END));/d' tables/table.sql

Expand Down
4 changes: 2 additions & 2 deletions yb-voyager/cmd/exportSchema.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func exportSchema() error {
// continue after logging the error; since this transformation is only for performance improvement
err = applyMergeConstraintsTransformations()
if err != nil {
log.Errorf("failed to apply merge constraints transformation to the schema files: %v", err)
log.Warnf("failed to apply merge constraints transformation to the schema files: %v", err)
}

utils.PrintAndLog("\nExported schema files created under directory: %s\n\n", filepath.Join(exportDir, "schema"))
Expand Down Expand Up @@ -341,7 +341,7 @@ func applyMigrationAssessmentRecommendations() error {

// TODO: merge this function with applying sharded/colocated recommendation
func applyMergeConstraintsTransformations() error {
if utils.GetEnvAsBool("YB_VOYAGER_SKIP_MERGE_CONSTRAINTS_TRANSFORMATIONS", false) {
if utils.GetEnvAsBool("YB_VOYAGER_SKIP_MERGE_CONSTRAINTS_TRANSFORMATIONS", true) {
log.Infof("skipping applying merge constraints transformation due to env var YB_VOYAGER_SKIP_MERGE_CONSTRAINTS_TRANSFORMATIONS=true")
return nil
}
Expand Down

0 comments on commit b756152

Please sign in to comment.