{"html_url": "https://github.com/simonw/sqlite-utils/pull/161#issuecomment-696442621", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/161", "id": 696442621, "node_id": "MDEyOklzc3VlQ29tbWVudDY5NjQ0MjYyMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-22T00:00:23Z", "updated_at": "2020-09-22T00:00:23Z", "author_association": "OWNER", "body": "I still need to figure out what to do about these various other table properties: https://github.com/simonw/sqlite-utils/blob/b34c9b40c206d7a9d7ee57a8c1f198ff1f522735/sqlite_utils/db.py#L775-L787", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 705975133, "label": "table.transform() method"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/161#issuecomment-696443042", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/161", "id": 696443042, "node_id": "MDEyOklzc3VlQ29tbWVudDY5NjQ0MzA0Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-22T00:01:50Z", "updated_at": "2020-09-22T00:01:50Z", "author_association": "OWNER", "body": "When you transform a table, it should keep its primary key, foreign keys, not_null and defaults. I don't think it needs to care about `hash_id` or `extracts=` since those don't affect the structure of the table as it is being created - well, `hash_id` does but if we are transforming an existing table we will get the `hash_id` column for free.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 705975133, "label": "table.transform() method"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/161#issuecomment-696443190", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/161", "id": 696443190, "node_id": "MDEyOklzc3VlQ29tbWVudDY5NjQ0MzE5MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-22T00:02:22Z", "updated_at": "2020-09-22T00:02:22Z", "author_association": "OWNER", "body": "How would I detect which columns are `not_null` and what their defaults are? I don`t think my introspection logic handles that yet.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 705975133, "label": "table.transform() method"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/161#issuecomment-696443845", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/161", "id": 696443845, "node_id": "MDEyOklzc3VlQ29tbWVudDY5NjQ0Mzg0NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-22T00:04:31Z", "updated_at": "2020-09-22T00:04:44Z", "author_association": "OWNER", "body": "Good news: the `.columns` introspection does tell me those things:\r\n```\r\n>>> import sqlite_utils\r\n>>> db = sqlite_utils.Database(memory=True)\r\n>>> db.create_table(\"foo\", {\"id\": int, \"name\": str, \"age\": int}, defaults={\"age\": 1}, not_null={\"name\", \"age\"})\r\n