db-seeder
db-seeder copied to clipboard
Is primary key hard-coded to "id"?
We have multiple tables with different primary key column than "id", e.g. "aid" or "qid". Looking at tebazil/db-seeder/src/TableConfigurator.php, line 45, Generator::PK only works for columns named "id"? Can we add a new feature to configure this column?
I think so, yes.
What I had in mind is that when it's an 'id', there is usually a convention to call foreign keys like 'article_id' or 'user_id'. But will this also be true to assume that if we have 'aid' or 'quid' as a primary key?
Our legacy app is very legacy, so no assumptions can be done on primary and foreign key conventions. It has to be fully configurable to be useful for us.
Thanks for the suggestion! I plan to release the update soon.