node-sql-fixtures icon indicating copy to clipboard operation
node-sql-fixtures copied to clipboard

Allow to specify the name of Primary Key

Open Takeno opened this issue 7 years ago • 1 comments

I've a database schema (MySQL in my case) which has no key named id but it uses idcustomer as primary key. In this way, node-sql-fixtures can't work.

 ER_BAD_FIELD_ERROR: Unknown column 'id' in 'where clause'

It should be nice to have the option to specify the primary key of table to avoid error.

Takeno avatar Feb 16 '18 12:02 Takeno

I agree sql-fixtures should support this. But to be honest I'm not sure when I'd ever get time to implement it. I do welcome pull requests.

city41 avatar Feb 17 '18 00:02 city41