simonw / datasette-edit-schema

Datasette plugin for modifying table schemas
Apache License 2.0
16 stars 0 forks source link

Test failures due to rowid columns #33

Closed simonw closed 2 years ago

simonw commented 2 years ago

Tests are failing in CI but not on my laptop: https://github.com/simonw/datasette-edit-schema/runs/7157814881

>       assert table.columns_dict == expected_columns_dict
E       AssertionError: assert {'description...lass 'float'>} == {'description...<class 'int'>}
E         Omitting 2 identical items, use -vv to show
E         Right contains 1 more item:
E         {'rowid': <class 'int'>}
E         Full diff:
E         - {'description': <class 'str'>, 'name': <class 'float'>, 'rowid': <class 'int'>}
E         ?                                                       ------------------------
E         + {'description': <class 'str'>, 'name': <class 'float'>}
simonw commented 2 years ago

My laptop has an OLD version of sqlite-utils:

% pip freeze | grep sqlite
sqlite-fts4==1.0.1
sqlite-utils==3.0a0
simonw commented 2 years ago

It's because of a bug I fixed in sqlite-utils 3.10: https://sqlite-utils.datasette.io/en/stable/changelog.html#v3-10

  • Bug fix: table.transform(), when run against a table without explicit primary keys, would incorrectly create a new version of the table with an explicit primary key column called rowid. (#284)