home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1683114719

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/sqlite-utils/pull/584#issuecomment-1683114719 https://api.github.com/repos/simonw/sqlite-utils/issues/584 1683114719 IC_kwDOCGYnMM5kUkrf 9599 2023-08-17T23:36:02Z 2023-08-17T23:36:02Z OWNER

Just these three lines recreate the problem: ```python from sqlite_utils import Database

fresh_db = Database(memory=True)

fresh_db.create_table("dogs", {"name": str}) fresh_db.create_table("breeds", {"name": str}) fresh_db["dogs"].add_column("breed_id", fk="breeds") Traceback: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/simon/Dropbox/Development/sqlite-utils/sqlite_utils/db.py", line 2170, in add_column self.add_foreign_key(col_name, fk, fk_col) File "/Users/simon/Dropbox/Development/sqlite-utils/sqlite_utils/db.py", line 2273, in add_foreign_key self.db.add_foreign_keys([(self.name, column, other_table, other_column)]) File "/Users/simon/Dropbox/Development/sqlite-utils/sqlite_utils/db.py", line 1169, in add_foreign_keys self[table].transform(add_foreign_keys=fks) File "/Users/simon/Dropbox/Development/sqlite-utils/sqlite_utils/db.py", line 1728, in transform sqls = self.transform_sql( ^^^^^^^^^^^^^^^^^^^ File "/Users/simon/Dropbox/Development/sqlite-utils/sqlite_utils/db.py", line 1896, in transform_sql self.db.create_table_sql( File "/Users/simon/Dropbox/Development/sqlite-utils/sqlite_utils/db.py", line 882, in create_table_sql raise AlterError( sqlite_utils.db.AlterError: No such column: breeds.rowid ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
1855838223  
Powered by Datasette · Queries took 1.755ms · About: github-to-sqlite