tsdataclinic / scout

Scout is a data discovery tool to explore open data portals worldwide.
https://scout.tsdataclinic.com
Apache License 2.0
33 stars 12 forks source link

Removed "on delete cascade" constraint from Dataset Column #346

Closed jps327 closed 1 year ago

jps327 commented 1 year ago

Summary

Now that datasets are configured to use soft deletion, we no longer need to support cascade deletion for dataset_column which is very inefficient and caused the data ingestion pipeline to take hours to complete. If a dataset is soft deleted, we can just keep the dataset_column entities, we don't need to delete them because the original dataset is marked as deleted already.

Screenshots or Videos (if applicable)

n/a

Related Issues

Closes #341

Test Plan

  1. Run yarn sync-schema
  2. Open the scout db in postgres, look at the dataset_column schema and verify that the CASCADE constraint has been removed from the datasetId foreign key constraint.

Checklist Before Requesting a Review