sqlite-utils 3.38a0__tar.gz → 4.0a0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. {sqlite_utils-3.38a0/sqlite_utils.egg-info → sqlite_utils-4.0a0}/PKG-INFO +15 -6
  2. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/docs/changelog.rst +22 -1
  3. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/docs/cli-reference.rst +0 -18
  4. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/docs/cli.rst +2 -28
  5. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/docs/python-api.rst +16 -3
  6. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/setup.py +2 -4
  7. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/sqlite_utils/cli.py +3 -10
  8. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/sqlite_utils/db.py +224 -107
  9. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0/sqlite_utils.egg-info}/PKG-INFO +15 -6
  10. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/sqlite_utils.egg-info/requires.txt +0 -3
  11. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_cli.py +8 -9
  12. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_create.py +12 -4
  13. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_fts.py +27 -0
  14. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_plugins.py +15 -1
  15. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_tracer.py +1 -1
  16. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_transform.py +123 -1
  17. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_upsert.py +5 -2
  18. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/LICENSE +0 -0
  19. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/MANIFEST.in +0 -0
  20. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/README.md +0 -0
  21. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/docs/contributing.rst +0 -0
  22. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/docs/index.rst +0 -0
  23. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/docs/installation.rst +0 -0
  24. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/docs/plugins.rst +0 -0
  25. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/docs/reference.rst +0 -0
  26. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/setup.cfg +0 -0
  27. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/sqlite_utils/__init__.py +0 -0
  28. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/sqlite_utils/__main__.py +0 -0
  29. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/sqlite_utils/hookspecs.py +0 -0
  30. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/sqlite_utils/plugins.py +0 -0
  31. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/sqlite_utils/py.typed +0 -0
  32. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/sqlite_utils/recipes.py +0 -0
  33. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/sqlite_utils/utils.py +0 -0
  34. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/sqlite_utils.egg-info/SOURCES.txt +0 -0
  35. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/sqlite_utils.egg-info/dependency_links.txt +0 -0
  36. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/sqlite_utils.egg-info/entry_points.txt +0 -0
  37. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/sqlite_utils.egg-info/not-zip-safe +0 -0
  38. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/sqlite_utils.egg-info/top_level.txt +0 -0
  39. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/__init__.py +0 -0
  40. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/conftest.py +0 -0
  41. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_analyze.py +0 -0
  42. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_analyze_tables.py +0 -0
  43. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_attach.py +0 -0
  44. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_cli_bulk.py +0 -0
  45. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_cli_convert.py +0 -0
  46. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_cli_insert.py +0 -0
  47. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_cli_memory.py +0 -0
  48. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_column_affinity.py +0 -0
  49. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_constructor.py +0 -0
  50. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_conversions.py +0 -0
  51. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_convert.py +0 -0
  52. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_create_view.py +0 -0
  53. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_default_value.py +0 -0
  54. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_delete.py +0 -0
  55. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_docs.py +0 -0
  56. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_duplicate.py +0 -0
  57. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_enable_counts.py +0 -0
  58. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_extract.py +0 -0
  59. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_extracts.py +0 -0
  60. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_get.py +0 -0
  61. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_gis.py +0 -0
  62. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_hypothesis.py +0 -0
  63. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_insert_files.py +0 -0
  64. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_introspect.py +0 -0
  65. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_lookup.py +0 -0
  66. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_m2m.py +0 -0
  67. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_query.py +0 -0
  68. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_recipes.py +0 -0
  69. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_recreate.py +0 -0
  70. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_register_function.py +0 -0
  71. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_rows.py +0 -0
  72. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_rows_from_file.py +0 -0
  73. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_sniff.py +0 -0
  74. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_suggest_column_types.py +0 -0
  75. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_update.py +0 -0
  76. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_utils.py +0 -0
  77. {sqlite_utils-3.38a0 → sqlite_utils-4.0a0}/tests/test_wal.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: sqlite-utils
3
- Version: 3.38a0
3
+ Version: 4.0a0
4
4
  Summary: CLI tool and Python library for manipulating SQLite databases
5
5
  Home-page: https://github.com/simonw/sqlite-utils
6
6
  Author: Simon Willison
@@ -16,13 +16,12 @@ Classifier: Intended Audience :: Science/Research
16
16
  Classifier: Intended Audience :: End Users/Desktop
17
17
  Classifier: Topic :: Database
18
18
  Classifier: License :: OSI Approved :: Apache Software License
19
- Classifier: Programming Language :: Python :: 3.8
20
19
  Classifier: Programming Language :: Python :: 3.9
21
20
  Classifier: Programming Language :: Python :: 3.10
22
21
  Classifier: Programming Language :: Python :: 3.11
23
22
  Classifier: Programming Language :: Python :: 3.12
24
23
  Classifier: Programming Language :: Python :: 3.13
25
- Requires-Python: >=3.8
24
+ Requires-Python: >=3.9
26
25
  Description-Content-Type: text/markdown
27
26
  License-File: LICENSE
28
27
  Requires-Dist: sqlite-fts4
@@ -52,8 +51,18 @@ Requires-Dist: types-pluggy; extra == "mypy"
52
51
  Requires-Dist: data-science-types; extra == "mypy"
53
52
  Provides-Extra: flake8
54
53
  Requires-Dist: flake8; extra == "flake8"
55
- Provides-Extra: tui
56
- Requires-Dist: trogon; extra == "tui"
54
+ Dynamic: author
55
+ Dynamic: classifier
56
+ Dynamic: description
57
+ Dynamic: description-content-type
58
+ Dynamic: home-page
59
+ Dynamic: license
60
+ Dynamic: license-file
61
+ Dynamic: project-url
62
+ Dynamic: provides-extra
63
+ Dynamic: requires-dist
64
+ Dynamic: requires-python
65
+ Dynamic: summary
57
66
 
58
67
  # sqlite-utils
59
68
 
@@ -4,6 +4,27 @@
4
4
  Changelog
5
5
  ===========
6
6
 
7
+ .. _v4_0a0:
8
+
9
+ 4.0a0 (2025-05-08)
10
+ ------------------
11
+
12
+ - Upsert operations now use SQLite's ``INSERT ... ON CONFLICT SET`` syntax on all SQLite versions later than 3.23.1. This is a very slight breaking change for apps that depend on the previous ``INSERT OR IGNORE`` followed by ``UPDATE`` behavior. (:issue:`652`)
13
+ - Python library users can opt-in to the previous implementation by passing ``use_old_upsert=True`` to the ``Database()`` constructor, see :ref:`python_api_old_upsert`.
14
+ - Dropped support for Python 3.8, added support for Python 3.13. (:issue:`646`)
15
+ - ``sqlite-utils tui`` is now provided by the `sqlite-utils-tui <https://github.com/simonw/sqlite-utils-tui>`__ plugin. (:issue:`648`)
16
+ - Test suite now also runs against SQLite 3.23.1, the last version (from 2018-04-10) before the new ``INSERT ... ON CONFLICT SET`` syntax was added. (:issue:`654`)
17
+
18
+ .. _v3_38:
19
+
20
+ 3.38 (2024-11-23)
21
+ -----------------
22
+
23
+ - Plugins can now reuse the implementation of the ``sqlite-utils memory`` CLI command with the new ``return_db=True`` parameter. (:issue:`643`)
24
+ - ``table.transform()`` now recreates indexes after transforming a table. A new ``sqlite_utils.db.TransformError`` exception is raised if these indexes cannot be recreated due to conflicting changes to the table such as a column rename. Thanks, `Mat Miller <https://github.com/matdmiller>`__. (:issue:`633`)
25
+ - ``table.search()`` now accepts a ``include_rank=True`` parameter, causing the resulting rows to have a ``rank`` column showing the calculated relevance score. Thanks, `liunux4odoo <https://github.com/liunux4odoo>`__. (`#628 <https://github.com/simonw/sqlite-utils/pull/628>`__)
26
+ - Fixed an error that occurred when creating a strict table with at least one floating point column. These ``FLOAT`` columns are now correctly created as ``REAL`` as well, but only for strict tables. (:issue:`644`)
27
+
7
28
  .. _v3_37:
8
29
 
9
30
  3.37 (2024-07-18)
@@ -101,7 +122,7 @@ This release introduces a new :ref:`plugin system <plugins>`. Read more about th
101
122
  3.32 (2023-05-21)
102
123
  -----------------
103
124
 
104
- - New experimental ``sqlite-utils tui`` interface for interactively building command-line invocations, powered by `Trogon <https://github.com/Textualize/trogon>`__. This requires an optional dependency, installed using ``sqlite-utils install trogon``. There is a screenshot :ref:`in the documentation <cli_tui>`. (:issue:`545`)
125
+ - New experimental ``sqlite-utils tui`` interface for interactively building command-line invocations, powered by `Trogon <https://github.com/Textualize/trogon>`__. This requires an optional dependency, installed using ``sqlite-utils install trogon``. (:issue:`545`)
105
126
  - ``sqlite-utils analyze-tables`` command (:ref:`documentation <cli_analyze_tables>`) now has a ``--common-limit 20`` option for changing the number of common/least-common values shown for each column. (:issue:`544`)
106
127
  - ``sqlite-utils analyze-tables --no-most`` and ``--no-least`` options for disabling calculation of most-common and least-common values.
107
128
  - If a column contains only ``null`` values, ``analyze-tables`` will no longer attempt to calculate the most common and least common values for that column. (:issue:`547`)
@@ -65,7 +65,6 @@ This page lists the ``--help`` for every ``sqlite-utils`` CLI sub-command.
65
65
  "create-spatial-index": "cli_spatialite_indexes",
66
66
  "install": "cli_install",
67
67
  "uninstall": "cli_uninstall",
68
- "tui": "cli_tui",
69
68
  }
70
69
  commands.sort(key = lambda command: go_first.index(command) if command in go_first else 999)
71
70
  cog.out("\n")
@@ -1045,23 +1044,6 @@ disable-fts
1045
1044
  -h, --help Show this message and exit.
1046
1045
 
1047
1046
 
1048
- .. _cli_ref_tui:
1049
-
1050
- tui
1051
- ===
1052
-
1053
- See :ref:`cli_tui`.
1054
-
1055
- ::
1056
-
1057
- Usage: sqlite-utils tui [OPTIONS]
1058
-
1059
- Open Textual TUI.
1060
-
1061
- Options:
1062
- -h, --help Show this message and exit.
1063
-
1064
-
1065
1047
  .. _cli_ref_optimize:
1066
1048
 
1067
1049
  optimize
@@ -1128,7 +1128,7 @@ You can insert binary data into a BLOB column by first encoding it using base64
1128
1128
  Inserting newline-delimited JSON
1129
1129
  --------------------------------
1130
1130
 
1131
- You can also import `newline-delimited JSON <http://ndjson.org/>`__ using the ``--nl`` option:
1131
+ You can also import newline-delimited JSON (see `JSON Lines <https://jsonlines.org/>`__) using the ``--nl`` option:
1132
1132
 
1133
1133
  .. code-block:: bash
1134
1134
 
@@ -1285,7 +1285,7 @@ You can set the ``SQLITE_UTILS_DETECT_TYPES`` environment variable if you want `
1285
1285
 
1286
1286
  If a CSV or TSV file includes empty cells, like this one:
1287
1287
 
1288
- .. code-block:: csv
1288
+ ::
1289
1289
 
1290
1290
  name,age,weight
1291
1291
  Cleo,6,
@@ -2782,29 +2782,3 @@ You can uninstall packages that were installed using ``sqlite-utils install`` wi
2782
2782
  sqlite-utils uninstall beautifulsoup4
2783
2783
 
2784
2784
  Use ``-y`` to skip the request for confirmation.
2785
-
2786
- .. _cli_tui:
2787
-
2788
- Experimental TUI
2789
- ================
2790
-
2791
- A TUI is a "text user interface" (or "terminal user interface") - a keyboard and mouse driven graphical interface running in your terminal.
2792
-
2793
- ``sqlite-utils`` has experimental support for a TUI for building command-line invocations, built on top of the `Trogon <https://github.com/Textualize/trogon/>`__ TUI library.
2794
-
2795
- To enable this feature you will need to install the ``trogon`` dependency. You can do that like so:
2796
-
2797
- .. code-block:: bash
2798
-
2799
- sqite-utils install trogon
2800
-
2801
- Once installed, running the ``sqlite-utils tui`` command will launch the TUI interface:
2802
-
2803
- .. code-block:: bash
2804
-
2805
- sqlite-utils tui
2806
-
2807
- You can then construct a command by selecting options from the menus, and execute it using ``Ctrl+R``.
2808
-
2809
- .. image:: _static/img/tui.png
2810
- :alt: A TUI interface for sqlite-utils - the left column shows a list of commands, while the right panel has a form for constructing arguments to the add-column command.
@@ -927,6 +927,13 @@ An ``upsert_all()`` method is also available, which behaves like ``insert_all()`
927
927
  .. note::
928
928
  ``.upsert()`` and ``.upsert_all()`` in sqlite-utils 1.x worked like ``.insert(..., replace=True)`` and ``.insert_all(..., replace=True)`` do in 2.x. See `issue #66 <https://github.com/simonw/sqlite-utils/issues/66>`__ for details of this change.
929
929
 
930
+ .. _python_api_old_upsert:
931
+
932
+ Alternative upserts using INSERT OR IGNORE
933
+ ------------------------------------------
934
+
935
+ Upserts use ``INSERT INTO ... ON CONFLICT SET``. Prior to ``sqlite-utils 4.0`` these used a sequence of ``INSERT OR IGNORE`` followed by an ``UPDATE``. This older method is still used for SQLite 3.23.1 and earlier. You can force the older implementation by passing ``use_old_upsert=True`` to the ``Database()`` constructor.
936
+
930
937
  .. _python_api_convert:
931
938
 
932
939
  Converting data in columns
@@ -1249,6 +1256,9 @@ If you pass a Python type, it will be mapped to SQLite types as shown here::
1249
1256
  np.float32: "FLOAT"
1250
1257
  np.float64: "FLOAT"
1251
1258
 
1259
+ .. note::
1260
+ In sqlite-utils 3.x ``FLOAT`` is used for floating point columns when the correct column type is actually ``REAL``. If you specify ``strict=True`` tables created in strict mode will use the correct column type of ``REAL`` instead. We plan to change this behavior in ``sqlite-utils`` 4.x to always use ``REAL``, but this will represent a minor breaking change and so is being held for the next major release, see issue :issue:`645`.
1261
+
1252
1262
  You can also add a column that is a foreign key reference to another table using the ``fk`` parameter:
1253
1263
 
1254
1264
  .. code-block:: python
@@ -1402,6 +1412,8 @@ To keep the original table around instead of dropping it, pass the ``keep_table=
1402
1412
 
1403
1413
  table.transform(types={"age": int}, keep_table="original_table")
1404
1414
 
1415
+ This method raises a ``sqlite_utils.db.TransformError`` exception if the table cannot be transformed, usually because there are existing constraints or indexes that are incompatible with modifications to the columns.
1416
+
1405
1417
  .. _python_api_transform_alter_column_types:
1406
1418
 
1407
1419
  Altering column types
@@ -2309,6 +2321,9 @@ The ``.search()`` method also accepts the following optional parameters:
2309
2321
  ``where_args`` dictionary
2310
2322
  Arguments to use for ``:param`` placeholders in the extra WHERE clause
2311
2323
 
2324
+ ``include_rank`` bool
2325
+ If set a ``rank`` column will be included with the BM25 ranking score - for FTS5 tables only.
2326
+
2312
2327
  ``quote`` bool
2313
2328
  Apply :ref:`FTS quoting rules <python_api_quote_fts>` to the search query, disabling advanced query syntax in a way that avoids surprising errors.
2314
2329
 
@@ -2703,7 +2718,7 @@ By default, the name of the Python function will be used as the name of the SQL
2703
2718
 
2704
2719
  print(db.execute('select rev("hello")').fetchone()[0])
2705
2720
 
2706
- Python 3.8 added the ability to register `deterministic SQLite functions <https://sqlite.org/deterministic.html>`__, allowing you to indicate that a function will return the exact same result for any given inputs and hence allowing SQLite to apply some performance optimizations. You can mark a function as deterministic using ``deterministic=True``, like this:
2721
+ If a function will return the exact same result for any given inputs you can register it as a `deterministic SQLite function <https://sqlite.org/deterministic.html>`__ allowing SQLite to apply some performance optimizations:
2707
2722
 
2708
2723
  .. code-block:: python
2709
2724
 
@@ -2711,8 +2726,6 @@ Python 3.8 added the ability to register `deterministic SQLite functions <https:
2711
2726
  def reverse_string(s):
2712
2727
  return "".join(reversed(list(s)))
2713
2728
 
2714
- If you run this on a version of Python prior to 3.8 your code will still work, but the ``deterministic=True`` parameter will be ignored.
2715
-
2716
2729
  By default registering a function with the same name and number of arguments will have no effect - the ``Database`` instance keeps track of functions that have already been registered and skips registering them if ``@db.register_function`` is called a second time.
2717
2730
 
2718
2731
  If you want to deliberately replace the registered function with a new implementation, use the ``replace=True`` argument:
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
  import io
3
3
  import os
4
4
 
5
- VERSION = "3.38a0"
5
+ VERSION = "4.0a0"
6
6
 
7
7
 
8
8
  def get_long_description():
@@ -50,7 +50,6 @@ setup(
50
50
  "data-science-types",
51
51
  ],
52
52
  "flake8": ["flake8"],
53
- "tui": ["trogon"],
54
53
  },
55
54
  entry_points="""
56
55
  [console_scripts]
@@ -64,7 +63,7 @@ setup(
64
63
  "Issues": "https://github.com/simonw/sqlite-utils/issues",
65
64
  "CI": "https://github.com/simonw/sqlite-utils/actions",
66
65
  },
67
- python_requires=">=3.8",
66
+ python_requires=">=3.9",
68
67
  classifiers=[
69
68
  "Development Status :: 5 - Production/Stable",
70
69
  "Intended Audience :: Developers",
@@ -72,7 +71,6 @@ setup(
72
71
  "Intended Audience :: End Users/Desktop",
73
72
  "Topic :: Database",
74
73
  "License :: OSI Approved :: Apache Software License",
75
- "Programming Language :: Python :: 3.8",
76
74
  "Programming Language :: Python :: 3.9",
77
75
  "Programming Language :: Python :: 3.10",
78
76
  "Programming Language :: Python :: 3.11",
@@ -35,11 +35,6 @@ from .utils import (
35
35
  TypeTracker,
36
36
  )
37
37
 
38
- try:
39
- import trogon # type: ignore
40
- except ImportError:
41
- trogon = None
42
-
43
38
 
44
39
  CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])
45
40
 
@@ -127,10 +122,6 @@ def cli():
127
122
  pass
128
123
 
129
124
 
130
- if trogon is not None:
131
- cli = trogon.tui()(cli)
132
-
133
-
134
125
  @cli.command()
135
126
  @click.argument(
136
127
  "path",
@@ -1107,7 +1098,9 @@ def insert_upsert_implementation(
1107
1098
  if (
1108
1099
  isinstance(e, OperationalError)
1109
1100
  and e.args
1110
- and "has no column named" in e.args[0]
1101
+ and (
1102
+ "has no column named" in e.args[0] or "no such column" in e.args[0]
1103
+ )
1111
1104
  ):
1112
1105
  raise click.ClickException(
1113
1106
  "{}\n\nTry using --alter to add additional columns".format(