{"html_url": "https://github.com/simonw/sqlite-utils/issues/450#issuecomment-1186002019", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/450", "id": 1186002019, "node_id": "IC_kwDOCGYnMM5GsPRj", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-07-15T22:39:09Z", "updated_at": "2022-07-15T22:39:09Z", "author_association": "OWNER", "body": "Here are all of the changes I made in this issue: https://github.com/simonw/sqlite-utils/compare/e10536c7f59abbb785f092bf83c4ab94c00e31a3...b9a89a0f2c3559989efe65f25a6e1f8fa76fe8b0", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1292060682, "label": "Add --ignore option to more commands"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/450#issuecomment-1186001408", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/450", "id": 1186001408, "node_id": "IC_kwDOCGYnMM5GsPIA", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-07-15T22:37:40Z", "updated_at": "2022-07-15T22:37:40Z", "author_association": "OWNER", "body": "I'm going to skip `add-geometry-column` and `create-spatial-index` as well.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1292060682, "label": "Add --ignore option to more commands"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/450#issuecomment-1185983894", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/450", "id": 1185983894, "node_id": "IC_kwDOCGYnMM5GsK2W", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-07-15T22:06:29Z", "updated_at": "2022-07-15T22:37:20Z", "author_association": "OWNER", "body": "Commands that could have `--ignore` added to them:\r\n\r\n- [x] `enable-fts`\r\n- [x] `disable-fts` (not doing)\r\n- [x] `add-column`\r\n- [x] `add-foreign-keys` (decided not to do this)\r\n- [x] `duplicate`\r\n- [x] `add-geometry-column` (decided not to do this)\r\n- [x] `create-spatial-index` (decided not to do this)", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1292060682, "label": "Add --ignore option to more commands"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/450#issuecomment-1185997860", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/450", "id": 1185997860, "node_id": "IC_kwDOCGYnMM5GsOQk", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-07-15T22:32:51Z", "updated_at": "2022-07-15T22:32:51Z", "author_association": "OWNER", "body": "`add-foreign-keys` is enough of a power-feature that I'm happy not to add this there.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1292060682, "label": "Add --ignore option to more commands"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/450#issuecomment-1185994282", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/450", "id": 1185994282, "node_id": "IC_kwDOCGYnMM5GsNYq", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-07-15T22:24:12Z", "updated_at": "2022-07-15T22:24:12Z", "author_association": "OWNER", "body": "I can do this for `--create-index` instead:\r\n```\r\nOptions:\r\n --name TEXT Explicit name for the new index\r\n --unique Make this a unique index\r\n --if-not-exists, --ignore Ignore if index already exists\r\n --analyze Run ANALYZE after creating the index\r\n --load-extension TEXT SQLite extensions to load\r\n -h, --help Show this message and exit.\r\n```\r\nThat supports both names for the option.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1292060682, "label": "Add --ignore option to more commands"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/450#issuecomment-1185993791", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/450", "id": 1185993791, "node_id": "IC_kwDOCGYnMM5GsNQ_", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-07-15T22:23:02Z", "updated_at": "2022-07-15T22:23:02Z", "author_association": "OWNER", "body": "`create-spatial-index` is tricky. For consistency with `create-index` it should really use `--if-not-exists` - but under the hood it's not using `IF NOT EXISTS` because those indexes are created using `select CreateSpatialIndex(...)`.\r\n\r\nReally this highlights that `--if-not-exists` is a bad name for that option on `create-index`.\r\n\r\nI'm tempted to add `--ignore` to `create-index` and mark `--if-not-exists` as deprecated - though it will still work because I don't want to release a major version bump.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1292060682, "label": "Add --ignore option to more commands"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/450#issuecomment-1185988480", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/450", "id": 1185988480, "node_id": "IC_kwDOCGYnMM5GsL-A", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-07-15T22:12:20Z", "updated_at": "2022-07-15T22:12:20Z", "author_association": "OWNER", "body": "`disable-fts` already fails silently if the table doesn't have FTS setup.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1292060682, "label": "Add --ignore option to more commands"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/450#issuecomment-1185988277", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/450", "id": 1185988277, "node_id": "IC_kwDOCGYnMM5GsL61", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-07-15T22:11:52Z", "updated_at": "2022-07-15T22:11:52Z", "author_association": "OWNER", "body": "For `enable-fts` I should use `--replace` instead, since that matches how the Python API works: https://github.com/simonw/sqlite-utils/blob/9dd4cf891d9f4565019e030ddc712507ac87b998/sqlite_utils/db.py#L2088-L2106", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1292060682, "label": "Add --ignore option to more commands"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/450#issuecomment-1185982012", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/450", "id": 1185982012, "node_id": "IC_kwDOCGYnMM5GsKY8", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-07-15T22:02:59Z", "updated_at": "2022-07-15T22:03:49Z", "author_association": "OWNER", "body": "From https://sqlite-utils.datasette.io/en/latest/cli-reference.html\r\n\r\nCommands that currently have an `--ignore` flag, and their descriptions:\r\n\r\n- `insert`: Ignore records if pk already exists\r\n- `create-table`: If table already exists, do nothing\r\n- `add-foreign-key`: If foreign key already exists, do nothing\r\n- `drop-table`: *description is missing*\r\n- `create-view`: If view already exists, do nothing\r\n- `drop-view`: *description is missing*\r\n\r\nAnd `create-index` has:\r\n\r\n- `--if-not-exists`: Ignore if index already exists", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1292060682, "label": "Add --ignore option to more commands"}, "performed_via_github_app": null}