Simon Willison
4d2274c53f
Use new TransformError instead of AssertionError
...
Refs https://github.com/simonw/sqlite-utils/pull/634#discussion_r1835474885
2024-11-23 11:39:36 -08:00
Simon Willison
3041c5d5da
Test for does not have a CREATE INDEX case
...
Thanks, o1-preview: https://gist.github.com/simonw/edcd047a703ab6d6759a5a207364d744#response-1
Refs https://github.com/simonw/sqlite-utils/pull/634#issuecomment-2466304653
2024-11-09 09:30:23 -08:00
Simon Willison
c47a2a42bc
Clarifying comments
2024-11-09 09:19:16 -08:00
Mathew Miller
e31dbf3f37
recreate indexes when calling transform when possible and raise an error when they cannot be retained automatically
2024-07-21 16:20:43 -05:00
Taj Khattra
1500c19bd0
Add more STRICT table support ( #604 )
...
* Add more STRICT table support per https://github.com/simonw/sqlite-utils/issues/344#issuecomment-982014776 .
* Make `table.transform()` preserve STRICT mode.
* Fix mypy failures in PR #604
* Link to SQLITE strict page in a few places
2023-12-07 21:05:27 -08:00
Simon Willison
1c6ea54338
.transform() now preserves rowid values
...
* .transform() now preserves rowid values, refs #592
* Test transform rowids against different table types, closes #592
2023-09-08 17:45:30 -07:00
Simon Willison
509857ee87
.add_foreign_keys() uses .transform() instead of PRAGMA writable_schema
...
Closes #577
This should solve all sorts of problems seen by users of platforms that throw errors on writable_schema.
Also added `add_foreign_keys=` and `foreign_keys=` parameters to `table.transform()`.
2023-08-17 17:48:08 -07:00
Simon Willison
61aaa69815
.transform(..., keep_table=name) parameter, closes #571
...
Also type hints for the transform_sql() method
2023-07-22 15:32:09 -07:00
Simon Willison
90e211e3e2
Now complies with flake8, refs #291
2021-06-22 18:22:08 -07:00
Simon Willison
0e797033f9
.transform() on rowid (non-pk) tables bug fix, closes #284
2021-06-19 08:28:26 -07:00
Simon Willison
5a63b9e88c
Simplify drop-foreign-key, and drop_foreign_keys, closes #177
2020-09-24 09:19:07 -07:00
Simon Willison
5534c320e4
Applied Black
2020-09-22 17:32:40 -07:00
Simon Willison
b8e0048485
Fixed PRAGMA foreign_keys handling for .transform, closes #167
2020-09-22 17:12:56 -07:00
Simon Willison
752d261229
Implemented sqlite-utils transform command, closes #164
2020-09-22 00:47:58 -07:00
Simon Willison
f8e10df00e
Keyword only arguments for transform()
...
Also renamed columns= to types=
Closes #165
2020-09-21 23:39:10 -07:00
Simon Willison
987dd123f2
table.transform() method - closes #114
2020-09-21 21:20:01 -07:00