SimpleInvoices Group Forum › Forums › Fearless359 SimpleInvoices Discussion Group › Update SI from an old version
Tagged: 2023, bill design, php 7.2, php 8.2, SI 2019.2.31, update
- This topic has 11 replies, 3 voices, and was last updated 11 months, 1 week ago by crossover.campustours.
-
AuthorPosts
-
November 7, 2023 at 2:13 am #2003crossover.campustoursParticipant
Hello,
Thank you Fearless for the work. I am used to work with uwamp, php 7.2.7, mysql 5.7.11 and the SI Version: 2019.2.31 — 20210211. I get errors to update with newer verion of SI and my bill design is broken as I did the last update version.
Wht shall I have to do ?
I enclose a dump of the sql because I need a bit help.
Regards- This topic was modified 1 year ago by crossover.campustours.
- This topic was modified 1 year ago by crossover.campustours.
Attachments:
November 7, 2023 at 11:18 am #2013fearless359KeymasterVia phpMyAdmin, access the si_invoice_items table and execute the following SQL command:
ALTER TABLE si_invoice_items MODIFY id INT(11) UNSIGNED NOT NULL;
Had to dig, but issue is that the invoice_item_id field in the si_invoice_item_tax table is configured differently than the id field in the si_invoice_items table. This command corrects the issue.
- This reply was modified 1 year ago by fearless359.
- This reply was modified 1 year ago by fearless359.
November 8, 2023 at 12:48 am #2017crossover.campustoursParticipantHello,
Thanks for the tip and the time you took to have a look. Unfortunatly as I copy paste the sql command to alter table si_invoice_items MySql returns an empty result where no line needs to be altered.
Need a bit more help please,
Regards
StéphaneNovember 9, 2023 at 9:00 am #2018fearless359KeymasterIn the schema you attached, the following is the id settings in si_invoice_items:
CREATE TABLE si_invoice_items ( id int(10) NOT NULL AUTO_INCREMENT,
It should be:
CREATE TABLE si_invoice_items ( id int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
If the table is set correctly, then the update process should complete as it did once I made the change. Note, you can change the field setting manually in phpMyAdmin by selecting the Change option on the id column under the Structure tab when si_invoice_items is selected.
- This reply was modified 1 year ago by fearless359.
November 10, 2023 at 8:11 am #2024crossover.campustoursParticipantHi,
I have tried your tips but I could not achieve to a good updated version 🙁 I am not good enough. Well I have tried to install SI 2023 with Wamp 64. It did well. It has told me updates need to be done from the #330 or #331 but sql updater did not be able to do these updates.
So I have begun with the 2023 version but I am frustrated I could not be able to solve my problems even if you have taken precious time to help.
I have uploaded the last sql version enclosed to this message. More over it says to check error.log but I do not know where the file is situated.
Well…
Regards
StéphaneAttachments:
November 11, 2023 at 11:56 am #2026crossover.campustoursParticipant[UPDATE & GOOD NEWS]
I did a new install from the 2019.2 version in wamp 64. I guess my uwamp was a bit old. I have imported my database from the previous install, everything did well. Then I have updated with 2023 version and have applied the sql patch. Several errors due to foreign keys in the invoice_item_tax table related to invoice_items table have been solved as I have deleted them. Made the update, everything is well and I have the 2023 version ! The design is not broken anymore.
Regards
Stéphane
- This reply was modified 1 year ago by crossover.campustours.
November 12, 2023 at 6:27 am #2028RRowleyParticipantGreat news. Thank you for letting me know.
November 18, 2023 at 6:25 pm #2029crossover.campustoursParticipantHi,
I am used to create the bills with the SI2023 version, php 8.2, mysql 8
I am back with a new bug I can not solve. I do not really understand the meaning of this error message enclosed in my png file.
What shall I have to do please ?
Regards
Stéphane- This reply was modified 12 months ago by crossover.campustours.
Attachments:
November 20, 2023 at 10:44 am #2032RRowleyParticipantThe error appears to complain that there is an attempt to add and si_invoice_items record with a duplicate value of 0 for its primary key. The primary key is (should be) the ID field. This field could only be assigned 0 if it does not have the auto increment setting on. User phpMyAdmin to verify this. There are two issues to correct. One is that there is now a record in that table with a 0 value for its ID field. That is a problem. I suggest you find which invoice this is for and delete it. If you don’t find a record with a 0 ID value, it was probably created for the invoice you are adding, say for the first invoice item and then it got an error on the second. Once you’ve cleared up the 0 ID issue, you can set the auto increment setting on the table. This can be done in phpMyAdmin. If you had to delete and invoice, add it back now. Make note of the original invoice number to reference it to the new number assigned to it for your records. Once you’ve taken care of any deleted invoice, you can add the invoice you were trying to add when this error occurred. All should be OK at this point.
November 20, 2023 at 12:43 pm #2033crossover.campustoursParticipantHi,
Thanks for the tip. I have found 0 ID and I have issued it manually. I have tried to check the option AI in the table si_invoice_items column ID. I can not. SQL error message says “Cannot change column ‘id’: used in a foreign key constraint ‘si_invoice_item_tax_ibfk_2’ of table si_invoice_item_tax
Well, I could not find this named column in the table and I do not know waht to do after this new message.
Regards,
StéphaneNovember 27, 2023 at 10:50 am #2034RRowleyParticipantThe issue is that the si_invoice_item_tax file has a foreign key set on the ID field of the si_invoice_items table. You need to make note of the foreign key settings and then delete the foreign key. Next add the auto increment to si_invoice_items ID field. Finally, add the foreign key back on the si_invoice_item_tax table.
December 11, 2023 at 12:06 am #2035crossover.campustoursParticipantHi,
Thanks a lot for your help. I have followed your advices and everything is ok now.
Bye then from France
Stéphane -
AuthorPosts
- You must be logged in to reply to this topic.
Recent Comments