plain.models 0.44.0__py3-none-any.whl → 0.45.0__py3-none-any.whl

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.
plain/models/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # plain-models changelog
2
2
 
3
+ ## [0.45.0](https://github.com/dropseed/plain/releases/plain-models@0.45.0) (2025-09-21)
4
+
5
+ ### What's changed
6
+
7
+ - Added unlimited varchar support to SQLite - CharField fields without a max_length now generate `varchar` columns instead of `varchar()` with no length specified ([c5c0c3a](https://github.com/dropseed/plain/commit/c5c0c3a743))
8
+
9
+ ### Upgrade instructions
10
+
11
+ - No changes required
12
+
3
13
  ## [0.44.0](https://github.com/dropseed/plain/releases/plain-models@0.44.0) (2025-09-19)
4
14
 
5
15
  ### What's changed
@@ -39,6 +39,12 @@ def adapt_datetime(val):
39
39
  return val.isoformat(" ")
40
40
 
41
41
 
42
+ def _get_varchar_column(data):
43
+ if data["max_length"] is None:
44
+ return "varchar"
45
+ return "varchar({max_length})".format(**data)
46
+
47
+
42
48
  Database.register_converter("bool", b"1".__eq__)
43
49
  Database.register_converter("date", decoder(parse_date))
44
50
  Database.register_converter("time", decoder(parse_time))
@@ -60,7 +66,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):
60
66
  "PrimaryKeyField": "integer",
61
67
  "BinaryField": "BLOB",
62
68
  "BooleanField": "bool",
63
- "CharField": "varchar(%(max_length)s)",
69
+ "CharField": _get_varchar_column,
64
70
  "DateField": "date",
65
71
  "DateTimeField": "datetime",
66
72
  "DecimalField": "decimal",
@@ -31,6 +31,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
31
31
  supports_json_field_contains = False
32
32
  supports_update_conflicts = Database.sqlite_version_info >= (3, 24, 0)
33
33
  supports_update_conflicts_with_target = supports_update_conflicts
34
+ supports_unlimited_charfield = True
34
35
 
35
36
  @cached_property
36
37
  def supports_atomic_references_rename(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.models
3
- Version: 0.44.0
3
+ Version: 0.45.0
4
4
  Summary: Model your data and store it in a database.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-File: LICENSE
@@ -1,5 +1,5 @@
1
1
  plain/models/AGENTS.md,sha256=xQQW-z-DehnCUyjiGSBfLqUjoSUdo_W1b0JmwYmWieA,209
2
- plain/models/CHANGELOG.md,sha256=xfDewS2Wt9gfbvC2fvpcZmQlaWAQCQ-YZ6aGLc69eHA,15141
2
+ plain/models/CHANGELOG.md,sha256=ydLOL2WwmZYT94V1tj0cqFocz6E7zo5M-Q7XWvIia_A,15529
3
3
  plain/models/README.md,sha256=lqzWJrEIxBCHC1P8X1YoRjbsMFlu0-kG4ujP76B_ZO4,8572
4
4
  plain/models/__init__.py,sha256=aB9HhIKBh0iK3LZztInAE-rDF-yKsdfcjfMtwtN5vnI,2920
5
5
  plain/models/aggregates.py,sha256=P0mhsMl1VZt2CVHMuCHnNI8SxZ9citjDLEgioN6NOpo,7240
@@ -60,10 +60,10 @@ plain/models/backends/postgresql/operations.py,sha256=c20oM27eflKLYaVOJclminrWVE
60
60
  plain/models/backends/postgresql/schema.py,sha256=6nruXkfuVesoqeCK5xDzGuZQRJLWj6n8G1VkPPzw8b0,13543
61
61
  plain/models/backends/sqlite3/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
62
  plain/models/backends/sqlite3/_functions.py,sha256=XsohPZN-xFEEmC28stQzAiSMvE0nHJ1cMHfL2Ze72vI,14317
63
- plain/models/backends/sqlite3/base.py,sha256=k8u1B8exitUp_HV6AIJfgHg0oltRh__xbwJlPl9RzOk,13121
63
+ plain/models/backends/sqlite3/base.py,sha256=O8fqoQL6PkCRtb7tBteh7aqY-e-DtSNqz6qgsmjnY3w,13258
64
64
  plain/models/backends/sqlite3/client.py,sha256=dvxY10LFJHKY6ykOuCE6e45Wo4fAH4IPDtNCH3Wvd34,324
65
65
  plain/models/backends/sqlite3/creation.py,sha256=dH4rqZj79TCMHmaBash4I_io15QCxnam92fuWrRK_R8,2788
66
- plain/models/backends/sqlite3/features.py,sha256=xbGiBom7Kh0xNTLZrFmTQ32C7M8q8UEmyi6hoBd25kE,2326
66
+ plain/models/backends/sqlite3/features.py,sha256=V7ueGfbUSzBNGgMRtCptXSH_0b51lyVfzi-98BX4afo,2366
67
67
  plain/models/backends/sqlite3/introspection.py,sha256=6nD5sbjxlJ1ocmwBxmyZqg7KT7fHKbjmmGZqAzmVpZc,17063
68
68
  plain/models/backends/sqlite3/operations.py,sha256=K2PFCsvzGhBrPEzz1AXFenge2B4Ap8lsQAABsC4e_UI,15302
69
69
  plain/models/backends/sqlite3/schema.py,sha256=sbtI0PBGe0fK0IOFWh0bkpVntCMMVsfzPb9dpL7o4r8,22566
@@ -115,8 +115,8 @@ plain/models/sql/where.py,sha256=ezE9Clt2BmKo-I7ARsgqZ_aVA-1UdayCwr6ULSWZL6c,126
115
115
  plain/models/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
116
116
  plain/models/test/pytest.py,sha256=KD5-mxonBxOYIhUh9Ql5uJOIiC9R4t-LYfb6sjA0UdE,3486
117
117
  plain/models/test/utils.py,sha256=S3d6zf3OFWDxB_kBJr0tDvwn51bjwDVWKPumv37N-p8,467
118
- plain_models-0.44.0.dist-info/METADATA,sha256=fzAPXuVnxvkoidy4MOMhKc4zDCrLW-Fl7uOzwKIJCbk,8884
119
- plain_models-0.44.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
120
- plain_models-0.44.0.dist-info/entry_points.txt,sha256=IYJAW9MpL3PXyXFWmKmALagAGXC_5rzBn2eEGJlcV04,112
121
- plain_models-0.44.0.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
122
- plain_models-0.44.0.dist-info/RECORD,,
118
+ plain_models-0.45.0.dist-info/METADATA,sha256=KH-Dp-3YMLQe0QWKK9VxV6c79zoghtxuqAqrEoq0qYI,8884
119
+ plain_models-0.45.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
120
+ plain_models-0.45.0.dist-info/entry_points.txt,sha256=IYJAW9MpL3PXyXFWmKmALagAGXC_5rzBn2eEGJlcV04,112
121
+ plain_models-0.45.0.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
122
+ plain_models-0.45.0.dist-info/RECORD,,