{"html_url": "https://github.com/simonw/sqlite-utils/issues/568#issuecomment-1646642666", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/568", "id": 1646642666, "node_id": "IC_kwDOCGYnMM5iJcXq", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-22T18:13:19Z", "updated_at": "2023-07-22T18:13:19Z", "author_association": "OWNER", "body": "https://sqlite-utils.datasette.io/en/stable/cli-reference.html#create-table\r\n\r\n```bash\r\nsqlite-utils create-table ... --replace\r\n```\r\nThat also has `--ignore`:\r\n\r\n```\r\n --ignore If table already exists, do nothing\r\n --replace If table already exists, replace it\r\n --transform If table already exists, try to transform the schema\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1816851056, "label": "table.create(..., replace=True)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/568#issuecomment-1646642959", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/568", "id": 1646642959, "node_id": "IC_kwDOCGYnMM5iJccP", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-22T18:14:49Z", "updated_at": "2023-07-22T18:14:49Z", "author_association": "OWNER", "body": "Here's where those are implemented for the `create-table` CLI command: https://github.com/simonw/sqlite-utils/blob/f7af23837deab5c98dae9441d1f68318065d7d8c/sqlite_utils/cli.py#L1543-L1564", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1816851056, "label": "table.create(..., replace=True)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/568#issuecomment-1646652105", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/568", "id": 1646652105, "node_id": "IC_kwDOCGYnMM5iJerJ", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-22T19:05:13Z", "updated_at": "2023-07-22T19:05:13Z", "author_association": "OWNER", "body": "I think this is `replace=True` and `ignore=True` to match the CLI. And refactoring the CLI to use them.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1816851056, "label": "table.create(..., replace=True)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/568#issuecomment-1646653382", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/568", "id": 1646653382, "node_id": "IC_kwDOCGYnMM5iJe_G", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-22T19:13:20Z", "updated_at": "2023-07-22T19:13:20Z", "author_association": "OWNER", "body": "Demo:\r\n```pycon\r\n>>> from sqlite_utils import Database\r\n>>> db = Database(memory=True)\r\n>>> db[\"foo\"].create({\"id\": int})\r\n