issue_comments: 507051516
This data as json
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/sqlite-utils/issues/23#issuecomment-507051516 | https://api.github.com/repos/simonw/sqlite-utils/issues/23 | 507051516 | MDEyOklzc3VlQ29tbWVudDUwNzA1MTUxNg== | 9599 | 2019-06-30T17:01:26Z | 2019-06-30T17:03:16Z | OWNER | Question: do I set a compound primary key on `(event_id, venue_id)` or do I add an auto-incrementing surrogate key as well? I'm leaning towards compound primary key. Maybe that's the default and there's an option for including a regular incrementing primary key. ``` db["events"].m2m(3, "venues", { "id": 4, "venue_name": "Blah", "latitude": 37.77 "longitude": 122.42 }, pk="id", m2m_surrogate_id=True) ``` If you use `m2m_surrogate_id` I'll still make sure to set up a unique constraint on `(event_id, venue_id)` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 449565204 |