Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Updated: Comment #0
I'm aware that it was me who just recently introduced this, but yeah. Sorry...
There was a lot of copy-pasting involved in that issue, apparently a little bit too much...
Problem/Motivation
StringLong specifies a default value for a 'text' schema type.
'text' schema types do not support specifying a default value.
Proposed resolution
Remove the default value from the schema.
I also removed the 'not null'. Both 'not null' and 'default' are terribly inconsistent right now in core, especially between field items and hook_schema(). I'll open an issue for that.
Comment | File | Size | Author |
---|---|---|---|
string-long-schema-broken.patch | 600 bytes | tstoeckler | |
Comments
Comment #1
tstoecklerThis now blocks #2183231: Make ContentEntityDatabaseStorage generate static database schemas for content entities, which is a beta blocker, so marking as critical.
Comment #2
BerdirThis matches existing big texts in core, although some of them explicitly have not null FALSE but that's the default.
The other issue will provide test coverage, would also have been possible to just fix it there I guess, another two lines like this wouldn't have mattered much :)
Comment #3
catchThanks!