home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1714919806

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/594#issuecomment-1714919806 https://api.github.com/repos/simonw/sqlite-utils/issues/594 1714919806 IC_kwDOCGYnMM5mN5l- 9599 2023-09-12T03:49:41Z 2023-09-12T03:49:41Z OWNER

Digging in a bit more: ```pycon

pprint(list(db.query('PRAGMA foreign_key_list(courses)'))) [{'from': 'campus_name', 'id': 0, 'match': 'NONE', 'on_delete': 'NO ACTION', 'on_update': 'NO ACTION', 'seq': 0, 'table': 'departments', 'to': 'campus_name'}, {'from': 'dept_code', 'id': 0, 'match': 'NONE', 'on_delete': 'NO ACTION', 'on_update': 'NO ACTION', 'seq': 1, 'table': 'departments', 'to': 'dept_code'}] `` I think the way you tell it's a compound foreign key is that both of those have the sameidvalue - of0- but they then have two differentseqvalues of0and1`.

Right now I ignore those columns entirely: https://github.com/simonw/sqlite-utils/blob/622c3a5a7dd53a09c029e2af40c2643fe7579340/sqlite_utils/db.py#L1523-L1540

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
1891614971  
Powered by Datasette · Queries took 1.781ms · About: github-to-sqlite