home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 1857851384 and user = 9599 sorted by updated_at descending

✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date)

user 1

  • simonw · 3 ✖

issue 1

  • New .add_foreign_key() can break if PRAGMA legacy_alter_table=ON and there's an invalid foreign key reference · 3 ✖

author_association 1

  • OWNER 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1685096381 https://github.com/simonw/sqlite-utils/issues/587#issuecomment-1685096381 https://api.github.com/repos/simonw/sqlite-utils/issues/587 IC_kwDOCGYnMM5kcIe9 simonw 9599 2023-08-19T20:04:32Z 2023-08-19T20:04:32Z OWNER

I'm inclined to say this isn't a bug in sqlite-utils though - it's a bug in the code that calls it. So I'm not going to fix it here.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
New .add_foreign_key() can break if PRAGMA legacy_alter_table=ON and there's an invalid foreign key reference 1857851384  
1685096284 https://github.com/simonw/sqlite-utils/issues/587#issuecomment-1685096284 https://api.github.com/repos/simonw/sqlite-utils/issues/587 IC_kwDOCGYnMM5kcIdc simonw 9599 2023-08-19T20:03:59Z 2023-08-19T20:03:59Z OWNER

Although this is revealing a problem in the underlying code (that schema is invalid), it also represents a regression: sqlite-utils 3.34 ran this just fine, but it fails on sqlite-utils 3.35 due to the change made in: - #577

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
New .add_foreign_key() can break if PRAGMA legacy_alter_table=ON and there's an invalid foreign key reference 1857851384  
1685096129 https://github.com/simonw/sqlite-utils/issues/587#issuecomment-1685096129 https://api.github.com/repos/simonw/sqlite-utils/issues/587 IC_kwDOCGYnMM5kcIbB simonw 9599 2023-08-19T20:03:00Z 2023-08-19T20:03:00Z OWNER

Simplest possible recreation of the bug: bash python -c ' import sqlite_utils db = sqlite_utils.Database(memory=True) db.execute(""" CREATE TABLE "logs" ( [id] INTEGER PRIMARY KEY, [chat_id] INTEGER REFERENCES [log]([id]), [reply_to_id] INTEGER ); """) db["logs"].add_foreign_key("reply_to_id", "logs", "id") ' That chat_id line is the line that causes the problem - because it is defining a reference to a table that no longer exists!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
New .add_foreign_key() can break if PRAGMA legacy_alter_table=ON and there's an invalid foreign key reference 1857851384  

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
, [performed_via_github_app] TEXT);
CREATE INDEX [idx_issue_comments_issue]
                ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
                ON [issue_comments] ([user]);
Powered by Datasette · Queries took 1137.647ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows