Closed (fixed)
Project:
Fraction
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
15 Jul 2021 at 19:42 UTC
Updated:
15 Dec 2021 at 19:49 UTC
Jump to comment: Most recent
The schema in 2.x is this:
'columns' => [
'numerator' => [
'description' => 'Fraction numerator value',
'type' => 'int',
'size' => 'big',
'not null' => FALSE,
],
'denominator' => [
'description' => 'Fraction denominator value',
'type' => 'int',
'not null' => FALSE,
],
],
8.x-1.x has:
'columns' => [
'numerator' => [
'description' => 'Fraction numerator value',
'type' => 'int',
'size' => 'big',
'not null' => TRUE,
'default' => 0,
],
'denominator' => [
'description' => 'Fraction denominator value',
'type' => 'int',
'not null' => TRUE,
'default' => 1,
],
],
This was changed in #3202832: Allow null values so Fraction can be used as an optional base field. The status page will show update errors without using the entity definition manager to update base and bundle fields.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
m.stentaAh thanks @mglaman! That was my mistake. I'll try to get the update hook for this together soon (definitely before the first 2.0.0 release).
Comment #5
m.stentaThanks for the merge request @pcambra!
I will try to review/test this soon. @mglaman if you are able/willing to test too, the more the merrier! :-)
Comment #6
mglamanI was on a paired programming call, I'll let them know :)
Comment #8
m.stentaThanks @mglaman and @pcambra for working on this! Is there anything left to do? Or do you think it's ready for final review/merge?
Comment #9
mglamanI think it looks good, just had those few nits, nothing blocking. I pinged the person in question to see if they can test.
I'll try to find time to make the quick changes @pcambra thumbed up
Comment #10
pcambra@mglaman if it's thumbed up, I should have solved them in the latest commit :) (unless I missed something), many thanks for the review!
Comment #11
mglamanoh! @pcambra did you force push? I just saw one commit so I thought maybe it was valid.
I'm happy with it, then :) I'll see if I can get it tested
Comment #12
pcambraThanks @mglaman
I think I might have consolidated in one commit, tbh I don't recall why I did this :o
Comment #13
m.stentaIf this looks good to both of you I will merge and tag 2.0.0 (along with #3240702: Column not found when running updb when that's ready).
Comment #14
m.stentaOh actually... ! This will need the same change from #3240702: Column not found when running updb to support single-value base fields.
Comment #15
m.stentaAdded a commit that uses
$table_mapping->getFieldColumnName()to get the column names, instead of building them ourselves. This should cover single-value base fields (as we ran into in #3240702: Column not found when running updb).I also force pushed the
3223868-needs-hookupdaten-tobranch to thefraction-3223868remote for the MR to update. @pcambra had pushed it tooriginpreviously, which is why the changes didn't show up in the MR here. I deletedorigin/3223868-needs-hookupdaten-to.Comment #17
m.stentaI went ahead and merged this - I'm going to tag 2.0.0 soon.