Closed josh-levinson closed 1 year ago
Please send a pull request with your recommendations and will do it.
On Wed, Nov 30, 2022 at 2:35 AM Josh Levinson @.***> wrote:
Given a schema entry like this:
add_foreign_key "activity_entries", "users"
So per Rails, activity_entries has a user_id table which coincides with the id table in users
But with PostgreSQL I am seeing something like this:
2022-11-29 20:52:02.405 UTC [370] ERROR: insert or update on table "activity_entries" violates foreign key constraint "fk_rails_abc12345" 2022-11-29 20:52:02.405 UTC [370] DETAIL: Key (user_id)=(12345) is not present in table "users".
But it SHOULD be looking for an id column in users, not a user_id column. I believe this is the Rails convention.
— Reply to this email directly, view it on GitHub https://github.com/sunitparekh/data-anonymization/issues/81, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABLNOSG5UV3VYF6HP23DEDWKZVZ5ANCNFSM6AAAAAASO5KW44 . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- thanks & regards, Sunit Parekh +91 99237 00662 @.***
This was my mistake, i think source/dest can't be the same w/whitelist strategy so need to rethink how this works, my apologies for the issue.
Given a schema entry like this:
add_foreign_key "activity_entries", "users"
So per Rails,
activity_entries
has auser_id
table which coincides with theid
table inusers
But with PostgreSQL I am seeing something like this:
But it SHOULD be looking for an
id
column inusers
, not auser_id
column. I believe this is the Rails convention.