{"html_url": "https://github.com/simonw/sqlite-utils/issues/13#issuecomment-466732039", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/13", "id": 466732039, "node_id": "MDEyOklzc3VlQ29tbWVudDQ2NjczMjAzOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-02-24T04:07:57Z", "updated_at": "2019-02-24T04:07:57Z", "author_association": "OWNER", "body": "Example: http://api.nobelprize.org/v1/laureate.json\r\n\r\nThis includes affiliations which look like this:\r\n\r\n \"affiliations\": [\r\n {\r\n \"name\": \"Sorbonne University\",\r\n \"city\": \"Paris\",\r\n \"country\": \"France\"\r\n }\r\n ]", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 413779210, "label": "Ability to automatically create IDs from content hash of row"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/10#issuecomment-466794069", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/10", "id": 466794069, "node_id": "MDEyOklzc3VlQ29tbWVudDQ2Njc5NDA2OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-02-24T16:55:37Z", "updated_at": "2019-02-24T16:55:37Z", "author_association": "OWNER", "body": "This was fixed by https://github.com/simonw/sqlite-utils/commit/228d595f7d10994f34e948888093c2cd290267c4 - see also #8 \r\n```\r\n>>> db = sqlite_utils.Database(\":memory:\")\r\n>>> dfX=pd.DataFrame({'order':range(3),'col2':range(3)})\r\n>>> db[\"test\"].upsert_all(dfX.to_dict(orient='records'))\r\n\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 411066700, "label": "Error in upsert if column named 'order'"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/14#issuecomment-466794369", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/14", "id": 466794369, "node_id": "MDEyOklzc3VlQ29tbWVudDQ2Njc5NDM2OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-02-24T16:59:11Z", "updated_at": "2019-02-24T16:59:43Z", "author_association": "OWNER", "body": "https://www.sqlite.org/lang_createindex.html\r\n\r\n![image](https://user-images.githubusercontent.com/9599/53302378-72512c80-3812-11e9-8828-46a03d893879.png)\r\n\r\nMay as well support ``--if-not-exists`` as well.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 413842611, "label": "Utilities for adding indexes"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/14#issuecomment-466800090", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/14", "id": 466800090, "node_id": "MDEyOklzc3VlQ29tbWVudDQ2NjgwMDA5MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-02-24T18:01:10Z", "updated_at": "2019-02-24T18:01:10Z", "author_association": "OWNER", "body": "The `WHERE` clause can be used to create partial indexes: https://www.sqlite.org/partialindex.html\r\n\r\nI'm going to ignore it for the moment.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 413842611, "label": "Utilities for adding indexes"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/14#issuecomment-466800210", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/14", "id": 466800210, "node_id": "MDEyOklzc3VlQ29tbWVudDQ2NjgwMDIxMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-02-24T18:02:23Z", "updated_at": "2019-02-24T18:02:23Z", "author_association": "OWNER", "body": "Likewise I'm going to ignore indexes on expressions (as opposed to just columns): https://www.sqlite.org/expridx.html", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 413842611, "label": "Utilities for adding indexes"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/2#issuecomment-466807308", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/2", "id": 466807308, "node_id": "MDEyOklzc3VlQ29tbWVudDQ2NjgwNzMwOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-02-24T19:18:19Z", "updated_at": "2019-02-24T19:18:25Z", "author_association": "OWNER", "body": "Python API:\r\n\r\n db[\"articles\"].add_foreign_key(\"author_id\", \"authors\", \"id\")\r\n\r\nCLI:\r\n\r\n $ sqlite-utils add-foreign-key articles author_id authors id\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 349850687, "label": "Mechanism for adding foreign keys to an existing table"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/17#issuecomment-466820167", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/17", "id": 466820167, "node_id": "MDEyOklzc3VlQ29tbWVudDQ2NjgyMDE2Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-02-24T21:42:33Z", "updated_at": "2019-02-24T21:42:33Z", "author_association": "OWNER", "body": "It looks like the type information isn't actually used for anything at all, so this:\r\n\r\nhttps://github.com/simonw/sqlite-utils/blob/f8d3b7cfe5c1950b0749d40eb2640df50b52f651/tests/test_create.py#L97-L103\r\n\r\nCould actually be written like this:\r\n\r\n```\r\n fresh_db[\"m2m\"].insert(\r\n {\"one_id\": 1, \"two_id\": 1},\r\n foreign_keys=(\r\n (\"one_id\", \"one\", \"id\"),\r\n (\"two_id\", \"two\", \"id\"),\r\n ),\r\n)\r\n```\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 413868452, "label": "Improve and document foreign_keys=... argument to insert/create/etc"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/17#issuecomment-466820188", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/17", "id": 466820188, "node_id": "MDEyOklzc3VlQ29tbWVudDQ2NjgyMDE4OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-02-24T21:42:50Z", "updated_at": "2019-02-24T21:42:50Z", "author_association": "OWNER", "body": "Sanity checking those foreign keys would be worthwhile.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 413868452, "label": "Improve and document foreign_keys=... argument to insert/create/etc"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/17#issuecomment-466821200", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/17", "id": 466821200, "node_id": "MDEyOklzc3VlQ29tbWVudDQ2NjgyMTIwMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-02-24T21:55:08Z", "updated_at": "2019-02-24T21:55:54Z", "author_association": "OWNER", "body": "This involves a breaking API change. I need to call that out in the README and also fix my two other projects which use the old four-tuple version of `foreign_keys=`:\r\n\r\nhttps://github.com/simonw/db-to-sqlite/blob/c2f8e93bc6bbdfd135de3656ea0f497859ae49ff/db_to_sqlite/cli.py#L30-L42\r\n\r\nAnd\r\n\r\nhttps://github.com/simonw/russian-ira-facebook-ads-datasette/blob/e7106710abdd7bdcae035bedd8bdaba75ae56a12/fetch_and_build_russian_ads.py#L71-L74\r\n\r\nI'll also need to set a minimum version for `sqlite-utils` in the `db-to-sqlite` setup.py:\r\n\r\nhttps://github.com/simonw/db-to-sqlite/blob/c2f8e93bc6bbdfd135de3656ea0f497859ae49ff/setup.py#L25", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 413868452, "label": "Improve and document foreign_keys=... argument to insert/create/etc"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/17#issuecomment-466823422", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/17", "id": 466823422, "node_id": "MDEyOklzc3VlQ29tbWVudDQ2NjgyMzQyMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-02-24T22:20:05Z", "updated_at": "2019-02-24T22:20:05Z", "author_association": "OWNER", "body": "Re-opening this until I've fixed the other two projects.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 413868452, "label": "Improve and document foreign_keys=... argument to insert/create/etc"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/17#issuecomment-466827533", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/17", "id": 466827533, "node_id": "MDEyOklzc3VlQ29tbWVudDQ2NjgyNzUzMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-02-24T23:03:29Z", "updated_at": "2019-02-24T23:03:29Z", "author_association": "OWNER", "body": "Need to put out a new release of `sqlite-utils` so `db-to-sqlite` can depend on it.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 413868452, "label": "Improve and document foreign_keys=... argument to insert/create/etc"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/17#issuecomment-466828503", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/17", "id": 466828503, "node_id": "MDEyOklzc3VlQ29tbWVudDQ2NjgyODUwMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-02-24T23:15:26Z", "updated_at": "2019-02-24T23:15:26Z", "author_association": "OWNER", "body": "Released: https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v0-14", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 413868452, "label": "Improve and document foreign_keys=... argument to insert/create/etc"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/17#issuecomment-466830869", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/17", "id": 466830869, "node_id": "MDEyOklzc3VlQ29tbWVudDQ2NjgzMDg2OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-02-24T23:45:48Z", "updated_at": "2019-02-24T23:45:48Z", "author_association": "OWNER", "body": "Both projects have been upgraded.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 413868452, "label": "Improve and document foreign_keys=... argument to insert/create/etc"}, "performed_via_github_app": null}