{"html_url": "https://github.com/simonw/sqlite-utils/releases/tag/3.34", "id": 113203288, "node_id": "RE_kwDOCGYnMM4Gv1hY", "tag_name": "3.34", "target_commitish": "main", "name": "3.34", "draft": 0, "author": {"value": 9599, "label": "simonw"}, "prerelease": 0, "created_at": "2023-07-22T23:25:14Z", "published_at": "2023-07-22T23:30:49Z", "body": "This release introduces a new [plugin system](https://sqlite-utils.datasette.io/en/stable/plugins.html#plugins). ([#567](https://github.com/simonw/sqlite-utils/issues/567))\r\n\r\n- Documentation describing [how to build a plugin](https://sqlite-utils.datasette.io/en/stable/plugins.html#plugins-building).\r\n- Plugin hook: [register_commands(cli)](https://sqlite-utils.datasette.io/en/stable/plugins.html#plugins-hooks-register-commands), for plugins to add extra commands to `sqlite-utils`. ([#569](https://github.com/simonw/sqlite-utils/issues/569))\r\n- Plugin hook: [prepare_connection(conn)](https://sqlite-utils.datasette.io/en/stable/plugins.html#plugins-hooks-prepare-connection). Plugins can use this to help prepare the SQLite connection to do things like registering custom SQL functions. Thanks, [Alex Garcia](https://github.com/asg017). ([#574](https://github.com/simonw/sqlite-utils/issues/574))\r\n- `sqlite_utils.Database(..., execute_plugins=False)` option for disabling plugin execution. ([#575](https://github.com/simonw/sqlite-utils/issues/575))\r\n- `sqlite-utils install -e path-to-directory` option for installing editable code. This option is useful during the development of a plugin. ([#570](https://github.com/simonw/sqlite-utils/issues/570))\r\n- `table.create(...)` method now accepts `replace=True` to drop and replace an existing table with the same name, or `ignore=True` to silently do nothing if a table already exists with the same name. ([#568](https://github.com/simonw/sqlite-utils/issues/568))\r\n- `sqlite-utils insert ... --stop-after 10` option for stopping the insert after a specified number of records. Works for the `upsert` command as well. ([#561](https://github.com/simonw/sqlite-utils/issues/561))\r\n- The `--csv` and `--tsv` modes for `insert` now accept a `--empty-null` option, which cases empty strings in the CSV file to be stored as `null` in the database. ([#563](https://github.com/simonw/sqlite-utils/issues/563))\r\n- New `db.rename_table(table_name, new_name)` method for renaming tables. ([#565](https://github.com/simonw/sqlite-utils/issues/565))\r\n- `sqlite-utils rename-table my.db table_name new_name` command for renaming tables. ([#565](https://github.com/simonw/sqlite-utils/issues/565))\r\n- The `table.transform(...)` method now takes an optional `keep_table=new_table_name` parameter, which will cause the original table to be renamed to `new_table_name` rather than being dropped at the end of the transformation. ([#571](https://github.com/simonw/sqlite-utils/issues/571))\r\n- Documentation now notes that calling `table.transform()` without any arguments will reformat the SQL schema stored by SQLite to be more aesthetically pleasing. ([#564](https://github.com/simonw/sqlite-utils/issues/564))", "repo": {"value": 140912432, "label": "sqlite-utils"}, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/releases/113203288/reactions\", \"total_count\": 2, \"+1\": 2, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}"} {"html_url": "https://github.com/simonw/sqlite-utils/releases/tag/3.35", "id": 117703394, "node_id": "RE_kwDOCGYnMM4HBALi", "tag_name": "3.35", "target_commitish": "main", "name": "3.35", "draft": 0, "author": {"value": 9599, "label": "simonw"}, "prerelease": 0, "created_at": "2023-08-18T02:05:15Z", "published_at": "2023-08-18T02:05:22Z", "body": "Adding foreign keys to a table no longer uses `PRAGMA writable_schema = 1` to directly manipulate the `sqlite_master` table. This was resulting in errors in some Python installations where the SQLite library was compiled in a way that prevented this from working, in particular on macOS. Foreign keys are now added using the [table transformation](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-transform) mechanism instead. ([#577](https://github.com/simonw/sqlite-utils/issues/577))\r\n\r\nThis new mechanism creates a full copy of the table, so it is likely to be significantly slower for large tables, but will no longer trigger table `sqlite_master may not be modified` errors on platforms that do not support `PRAGMA writable_schema = 1`.\r\n\r\nA new plugin, [sqlite-utils-fast-fks](https://github.com/simonw/sqlite-utils-fast-fks), is now available for developers who still want to use that faster but riskier implementation.\r\n\r\nOther changes:\r\n\r\n- The [table.transform() method](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-transform) has two new parameters: `foreign_keys=` allows you to replace the foreign key constraints defined on a table, and `add_foreign_keys=` lets you specify new foreign keys to add. These complement the existing `drop_foreign_keys=` parameter. ([#577](https://github.com/simonw/sqlite-utils/issues/577))\r\n- The [sqlite-utils transform](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-transform-table) command has a new `--add-foreign-key` option which can be called multiple times to add foreign keys to a table that is being transformed. ([#585](https://github.com/simonw/sqlite-utils/issues/585))\r\n- [sqlite-utils convert](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-convert) now has a `--pdb` option for opening a debugger on the first encountered error in your conversion script. ([#581](https://github.com/simonw/sqlite-utils/issues/581))\r\n- Fixed a bug where `sqlite-utils install -e '.[test]'` option did not work correctly.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/releases/117703394/reactions\", \"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}"} {"html_url": "https://github.com/simonw/sqlite-utils/releases/tag/3.35.1", "id": 120501239, "node_id": "RE_kwDOCGYnMM4HLrP3", "tag_name": "3.35.1", "target_commitish": "main", "name": "3.35.1", "draft": 0, "author": {"value": 9599, "label": "simonw"}, "prerelease": 0, "created_at": "2023-09-09T00:49:55Z", "published_at": "2023-09-09T00:50:42Z", "body": "- Fixed a bug where [table.transform()](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-transform) would sometimes re-assign the `rowid` values for a table rather than keeping them consistent across the operation. ([#592](https://github.com/simonw/sqlite-utils/issues/592))", "repo": {"value": 140912432, "label": "sqlite-utils"}, "reactions": null} {"html_url": "https://github.com/simonw/sqlite-utils/releases/tag/3.35.2", "id": 127967404, "node_id": "RE_kwDOCGYnMM4HoKCs", "tag_name": "3.35.2", "target_commitish": "main", "name": "3.35.2", "draft": 0, "author": {"value": 9599, "label": "simonw"}, "prerelease": 0, "created_at": "2023-11-04T01:03:42Z", "published_at": "2023-11-04T01:05:56Z", "body": "- The `--load-extension=spatialite` option and [find_spatialite()](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-gis-find-spatialite) utility function now both work correctly on `arm64` Linux. Thanks, [Mike Coats](https://github.com/MikeCoats). ([#599](https://github.com/simonw/sqlite-utils/issues/599))\r\n- Fix for bug where `sqlite-utils insert` could cause your terminal cursor to disappear. Thanks, [Luke Plant](https://github.com/spookylukey). ([#433](https://github.com/simonw/sqlite-utils/issues/433))\r\n- `datetime.timedelta` values are now stored as `TEXT` columns. Thanks, [Harald Nezbeda](https://github.com/nezhar). ([#522](https://github.com/simonw/sqlite-utils/issues/522))\r\n- Test suite is now also run against Python 3.12.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "reactions": null} {"html_url": "https://github.com/simonw/sqlite-utils/releases/tag/3.4", "id": 37437744, "node_id": "MDc6UmVsZWFzZTM3NDM3NzQ0", "tag_name": "3.4", "target_commitish": "main", "name": "3.4", "draft": 0, "author": {"value": 9599, "label": "simonw"}, "prerelease": 0, "created_at": "2021-02-06T01:37:27Z", "published_at": "2021-02-06T01:38:26Z", "body": "- `sqlite-utils insert --csv` now accepts optional `--delimiter` and `--quotechar` options. See [Alternative delimiters and quote characters](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-insert-csv-tsv-delimiter). ([#223](https://github.com/simonw/sqlite-utils/issues/223))", "repo": {"value": 140912432, "label": "sqlite-utils"}, "reactions": null} {"html_url": "https://github.com/simonw/sqlite-utils/releases/tag/3.4.1", "id": 37438817, "node_id": "MDc6UmVsZWFzZTM3NDM4ODE3", "tag_name": "3.4.1", "target_commitish": "main", "name": "3.4.1", "draft": 0, "author": {"value": 9599, "label": "simonw"}, "prerelease": 0, "created_at": "2021-02-06T02:10:04Z", "published_at": "2021-02-06T02:11:15Z", "body": "- Fixed a code import bug that slipped in to 3.4. ([#226](https://github.com/simonw/sqlite-utils/issues/226))", "repo": {"value": 140912432, "label": "sqlite-utils"}, "reactions": null} {"html_url": "https://github.com/simonw/sqlite-utils/releases/tag/3.5", "id": 38037267, "node_id": "MDc6UmVsZWFzZTM4MDM3MjY3", "tag_name": "3.5", "target_commitish": "main", "name": "3.5", "draft": 0, "author": {"value": 9599, "label": "simonw"}, "prerelease": 0, "created_at": "2021-02-14T22:43:06Z", "published_at": "2021-02-14T22:44:21Z", "body": "- `sqlite-utils insert --sniff` option for detecting the delimiter and quote character used by a CSV file, see [Alternative delimiters and quote characters](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-insert-csv-tsv-delimiter). ([#230](https://github.com/simonw/sqlite-utils/issues/230))\r\n- The `table.rows_where()`, `table.search()` and `table.search_sql()` methods all now take optional `offset=` and `limit=` arguments. ([#231](https://github.com/simonw/sqlite-utils/issues/231))\r\n- New `--no-headers` option for `sqlite-utils insert --csv` to handle CSV files that are missing the header row, see [CSV files without a header row](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-insert-csv-tsv-no-header). ([#228](https://github.com/simonw/sqlite-utils/issues/228))\r\n- Fixed bug where inserting data with extra columns in subsequent chunks would throw an error. Thanks [@nieuwenhoven](https://github.com/nieuwenhoven) for the fix. ([#234](https://github.com/simonw/sqlite-utils/issues/234))\r\n- Fixed bug importing CSV files with columns containing more than 128KB of data. ([#229](https://github.com/simonw/sqlite-utils/issues/229))\r\n- Test suite now runs in CI against Ubuntu, macOS and Windows. Thanks [@nieuwenhoven](https://github.com/nieuwenhoven) for the Windows test fixes. ([#232](https://github.com/simonw/sqlite-utils/issues/232))", "repo": {"value": 140912432, "label": "sqlite-utils"}, "reactions": null} {"html_url": "https://github.com/simonw/sqlite-utils/releases/tag/3.6", "id": 38290990, "node_id": "MDc6UmVsZWFzZTM4MjkwOTkw", "tag_name": "3.6", "target_commitish": "main", "name": "3.6", "draft": 0, "author": {"value": 9599, "label": "simonw"}, "prerelease": 0, "created_at": "2021-02-19T05:18:02Z", "published_at": "2021-02-19T05:19:00Z", "body": "This release adds the ability to execute queries joining data from more than one database file - similar to the cross database querying feature introduced in [Datasette 0.55](https://docs.datasette.io/en/stable/changelog.html#v0-55).\r\n\r\n- The `db.attach(alias, filepath)` Python method can be used to attach extra databases to the same connection, see [db.attach() in the Python API documentation](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-attach). ([#113](https://github.com/simonw/sqlite-utils/issues/113))\r\n- The `--attach` option attaches extra aliased databases to run SQL queries against directly on the command-line, see [attaching additional databases in the CLI documentation](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-attach). ([#236](https://github.com/simonw/sqlite-utils/issues/236))", "repo": {"value": 140912432, "label": "sqlite-utils"}, "reactions": null} {"html_url": "https://github.com/simonw/sqlite-utils/releases/tag/3.7", "id": 43797212, "node_id": "MDc6UmVsZWFzZTQzNzk3MjEy", "tag_name": "3.7", "target_commitish": "main", "name": "3.7", "draft": 0, "author": {"value": 9599, "label": "simonw"}, "prerelease": 0, "created_at": "2021-05-29T05:47:59Z", "published_at": "2021-05-29T05:49:59Z", "body": "- New `table.pks_and_rows_where()` method returning `(primary_key, row_dictionary)` tuples - see [Listing rows with their primary keys](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-pks-and-rows-where). ([#240](https://github.com/simonw/sqlite-utils/issues/240))\r\n- Fixed bug with *table.add_foreign_key()* against columns containing spaces. ([#238](https://github.com/simonw/sqlite-utils/issues/238))\r\n- `table_or_view.drop(ignore=True)` option for avoiding errors if the table or view does not exist. ([#237](https://github.com/simonw/sqlite-utils/issues/237))\r\n- `sqlite-utils drop-view --ignore` and `sqlite-utils drop-table --ignore` options. ([#237](https://github.com/simonw/sqlite-utils/issues/237))\r\n- Fixed a bug with inserts of nested JSON containing non-ascii strings - thanks, Dylan Wu. ([#257](https://github.com/simonw/sqlite-utils/issues/257))\r\n- Suggest `--alter` if an error occurs caused by a missing column. ([#259](https://github.com/simonw/sqlite-utils/issues/259))\r\n- Support creating indexes with columns in descending order, see [API documentation](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-create-index) and [CLI documentation](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-create-index). ([#260](https://github.com/simonw/sqlite-utils/issues/260))\r\n- Correctly handle CSV files that start with a UTF-8 BOM. ([#250](https://github.com/simonw/sqlite-utils/issues/250))", "repo": {"value": 140912432, "label": "sqlite-utils"}, "reactions": null} {"html_url": "https://github.com/simonw/sqlite-utils/releases/tag/3.8", "id": 44019361, "node_id": "MDc6UmVsZWFzZTQ0MDE5MzYx", "tag_name": "3.8", "target_commitish": "main", "name": "3.8", "draft": 0, "author": {"value": 9599, "label": "simonw"}, "prerelease": 0, "created_at": "2021-06-03T05:16:33Z", "published_at": "2021-06-03T05:17:33Z", "body": "- New `sqlite-utils indexes` command to list indexes in a database, see [Listing indexes](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-indexes). ([#263](https://github.com/simonw/sqlite-utils/issues/263))\r\n- `table.xindexes` introspection property returning more details about that table's indexes, see [.xindexes](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-introspection-xindexes). ([#261](https://github.com/simonw/sqlite-utils/issues/261))", "repo": {"value": 140912432, "label": "sqlite-utils"}, "reactions": null} {"html_url": "https://github.com/simonw/sqlite-utils/releases/tag/3.9", "id": 44511190, "node_id": "MDc6UmVsZWFzZTQ0NTExMTkw", "tag_name": "3.9", "target_commitish": "main", "name": "3.9", "draft": 0, "author": {"value": 9599, "label": "simonw"}, "prerelease": 0, "created_at": "2021-06-12T02:07:18Z", "published_at": "2021-06-12T02:08:03Z", "body": "- New `sqlite-utils schema` command showing the full SQL schema for a database, see [Showing the schema (CLI)](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-schema). ([#268](https://github.com/simonw/sqlite-utils/issues/268))\r\n- `db.schema` introspection property exposing the same feature to the Python library, see [Showing the schema (Python library)](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-schema).", "repo": {"value": 140912432, "label": "sqlite-utils"}, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/releases/44511190/reactions\", \"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}"} {"html_url": "https://github.com/simonw/sqlite-utils/releases/tag/3.9.1", "id": 44529219, "node_id": "MDc6UmVsZWFzZTQ0NTI5MjE5", "tag_name": "3.9.1", "target_commitish": "main", "name": "3.9.1", "draft": 0, "author": {"value": 9599, "label": "simonw"}, "prerelease": 0, "created_at": "2021-06-13T02:59:08Z", "published_at": "2021-06-13T03:00:45Z", "body": "- Fixed bug when using `table.upsert_all()` to create a table with only a single column that is treated as the primary key. ([#271](https://github.com/simonw/sqlite-utils/issues/271))", "repo": {"value": 140912432, "label": "sqlite-utils"}, "reactions": null}