Jump to content

Edit History

Gneston

Gneston


Adding code as images

Hi, 

I recently upgraded to Prestashop 1.7.8.5 from Prestahop 1.7.6.1.

I have some self written modules where I use Doctrine to store my data in the database (like its explained here: https://devdocs.prestashop.com/1.7/modules/concepts/doctrine/

I created the databases with an sql script like this one: 

image.thumb.png.f40bb1b7fb1fb932df1f7867907e5c7e.png

And in src/Entity I have a File called MpOrder.php where I wrote this: 

image.thumb.png.53ea166e3565d89f016d7b8d7545b238.png

After the Prestashop upgrade the ps_mp_order was changed and id_shipment was not longer allowed to be nullable. I manually changed the table definition, so my modules works again, but why did this occur? I have a database dump from before the upgrade and the field is described there with 

image.thumb.png.8f2f4ac452e3ecdd467c48412dab16e1.png

After the upgrade a dump of the same table showed 

image.thumb.png.31cdfcdea53f6b08391fc9bf44742871.png

So I am quite sure, the upgrade changed something here. What have I done wrong? What do I have to do, to prevent the next Prestashop upgrade from changing my nullable fields to not nullable fields?

Edit: I can not write code blocks here. The website tells me my request have been blocked, when I click on submit/edit after inserting code in code blocks. That's why I use images instead.

Gneston

Gneston


Adding code as text

Hi, 

I recently upgraded to Prestashop 1.7.8.5 from Prestahop 1.7.6.1.

I have some self written modules where I use Doctrine to store my data in the database (like its explained here: https://devdocs.prestashop.com/1.7/modules/concepts/doctrine/

I created the databases with an sql script like this one: 

image.thumb.png.f40bb1b7fb1fb932df1f7867907e5c7e.png

And in src/Entity I have a File called MpOrder.php where I wrote this: 

image.thumb.png.53ea166e3565d89f016d7b8d7545b238.png

After the Prestashop upgrade the ps_mp_order was changed and id_shipment was not longer allowed to be nullable. I manually changed the table definition, so my modules works again, but why did this occur? I have a database dump from before the upgrade and the field is described there with 

image.thumb.png.8f2f4ac452e3ecdd467c48412dab16e1.png

After the upgrade a dump of the same table showed 

image.thumb.png.31cdfcdea53f6b08391fc9bf44742871.png

So I am quite sure, the upgrade changed something here. What have I done wrong? What do I have to do, to prevent the next Prestashop upgrade from changing my nullable fields to not nullable fields?

Edit: I can not write code blocks here. The website tells me my request have been blocked, when I click on submit/edit after inserting code in code blocks. That's why I use images instead.

image.png

Gneston

Gneston


Adding code as text

Hi, 

I recently upgraded to Prestashop 1.7.8.5 from Prestahop 1.7.6.1.

I have some self written modules where I use Doctrine to store my data in the database (like its explained here: https://devdocs.prestashop.com/1.7/modules/concepts/doctrine/

I created the databases with an sql script like this one: 

 

image.thumb.png.f40bb1b7fb1fb932df1f7867907e5c7e.png

And in src/Entity I have a File called MpOrder.php where I wrote this: 

image.thumb.png.53ea166e3565d89f016d7b8d7545b238.png

 

After the Prestashop upgrade the ps_mp_order was changed and id_shipment was not longer allowed to be nullable. I manually changed the table definition, so my modules works again, but why did this occur? I have a database dump from before the upgrade and the field is described there with 

 

After the upgrade a dump of the same table showed 
 

What have I done wrong? What do I have to do, to prevent the next Prestashop upgrade from changing my nullable fields to not nullable fields?

 

Edit: I can not write code blocks here. The website tells me my request have been blocked, when I click on submit/edit after inserting coe in code blocks. 

Gneston

Gneston

Hi, 

I recently upgraded to Prestashop 1.7.8.5 from Prestahop 1.7.6.1.

I have some self written modules where I use Doctrine to store my data in the database (like its explained here: https://devdocs.prestashop.com/1.7/modules/concepts/doctrine/

I created the databases with an sql script like this one: 

And in src/Entity I have a File called MpOrder.php where I wrote this: 


After the Prestashop upgrade the ps_mp_order was changed and id_shipment was not longer allowed to be nullable. I manually changed the table definition, so my modules works again, but why did this occur? I have a database dump from before the upgrade and the entity is described there with 

 

After the upgrade a dump of the same table showed 
 

What have I done wrong? What do I have to do, to prevent the next Prestashop upgrade from changing my nullable fields to not nullable fields?

×
×
  • Create New...