shuttle-hq / synth

The Declarative Data Generator
https://www.getsynth.com/
Apache License 2.0
1.37k stars 108 forks source link

2 primary keys support #323

Open oleh97 opened 2 years ago

oleh97 commented 2 years ago

Required Functionality When importing an existing database schema from PostgreSQL that has tables with 2 primary keys : ALTER TABLE IF EXISTS x.x ADD FOREIGN KEY ("asd", "dsa") REFERENCES wms.x("ad", "dsa") NOT VALID;

Proposed Solution

Use case Adding tables that contain 2 primary keys and generate consisting data into them

IvoLeist commented 2 years ago

@oleh97 looks to me that this is unfortunately not yet supported: I get the following error message:

Error: 2 primary keys found at collection id_to_product. Synth does not currently support composite primary keys.

when trying to do: synth import test-db --from postgres://user:pass@localhost:5433/postgres

Btw. this seem to be a duplicated issue (?) Feature: composite primary keys