# OpenEMR 5.0.2 Patch

**URL:** <https://community.open-emr.org/t/openemr-5-0-2-patch/13007>\
**Category:** OpenEMR Development\
**Created:** [October 15, 2019, 8:46am UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007 "2019-10-15T08:46:15Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![jhunyan](https://community.open-emr.org/letter_avatar_proxy/v4/letter/j/7c8e57/32.png) [@jhunyan](https://community.open-emr.org/u/jhunyan)\
**Post date:** [April 29, 2020, 11:51pm UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/21 "2020-04-29T23:51:26Z")

</div>

I got the same problem when updating Openemr. My database is using mysql.

Error message as below.

## Query Error

ERROR: query failed: UPDATE `icd10_dx_order_code`SET `revision` = (SELECT MAX(`revision`) from icd10\_dx\_order\_code) WHERE `dx_code` = ‘U071’

Error: Table ‘icd10\_dx\_order\_code’ is specified twice, both as a target for ‘UPDATE’ and as a separate source for data

I tried Mark solution but it seems like it did not work by making changes to patch.sql

Please follow up.

Thanks

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [April 29, 2020, 11:54pm UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/22 "2020-04-29T23:54:36Z")

</div>

Hi @jhunyan ,

What version of mysql are you using?  
And what errors did you see when using @madmax 's solution?

thanks,  
-brady

---

<div class="post-metadata">

**Author:** ![jhunyan](https://community.open-emr.org/letter_avatar_proxy/v4/letter/j/7c8e57/32.png) [@jhunyan](https://community.open-emr.org/u/jhunyan)\
**Post date:** [April 30, 2020, 12:09am UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/23 "2020-04-30T00:09:38Z")

</div>

Hi @brady.miller,

Thanks for prompt reply. I checked my server and it is MarianDB, not mysql as I thought.

- Server: Localhost via UNIX socket
- Server type: MariaDB
- Server version:10.2.31-MariaDB - MariaDB Server
- Protocol version: 10

The error remains the same when I tried @madmax 's solution.

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [April 30, 2020, 12:31am UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/24 "2020-04-30T00:31:53Z")

</div>

hi @jhunyan ,

Try it after replacing your sql/patch.sql file with the following:  
[https://raw.githubusercontent.com/openemr/openemr/dc1947df370cde40c49ced6e03884c47d8d6437f/sql/patch.sql](https://raw.githubusercontent.com/openemr/openemr/dc1947df370cde40c49ced6e03884c47d8d6437f/sql/patch.sql)

Let me know if this works. It looks like this is an issue in older mysql/mariadb versions. Luckily, it doesn’t impact anything else in the patch (the only thing this error stops is the importing of the covid icd10 codes).

thanks,  
-brady

---

<div class="post-metadata">

**Author:** ![jhunyan](https://community.open-emr.org/letter_avatar_proxy/v4/letter/j/7c8e57/32.png) [@jhunyan](https://community.open-emr.org/u/jhunyan)\
**Post date:** [April 30, 2020, 1:15am UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/25 "2020-04-30T01:15:13Z")

</div>

Hi @brady.miller,

I tried replacing the patch as you mentioned and it is working normally. Thank you very much.

The message of the update is as below.

OpenEMR 5.0.2 Database Patch 2

Applying Patch to site : default

Processing patch.sql …  
Skipping section #IfNotRow2D list\_options list\_id apps option\_id oeSignerRemote  
Skipping section #IfNotColumnType form\_eye\_neuro ACT5CCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT1CCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT2CCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT3CCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT4CCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT6CCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT7CCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT8CCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT9CCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT10CCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT11CCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT1SCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT2SCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT3SCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT4SCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT5SCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT6SCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT7SCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT8SCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT9SCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT10SCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT11SCDIST text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT1SCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT2SCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT3SCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT4SCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT5CCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT6CCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT7CCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT8CCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT9CCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT10CCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT11CCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT5SCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT6SCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT7SCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT8SCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT9SCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT10SCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT11SCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT1CCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT2CCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT3CCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ACT4CCNEAR text  
Skipping section #IfNotColumnType form\_eye\_neuro ODNPA text  
Skipping section #IfNotColumnType form\_eye\_neuro OSNPA text  
Skipping section #IfNotColumnType form\_eye\_neuro VERTFUSAMPS text  
Skipping section #IfNotColumnType form\_eye\_neuro DIVERGENCEAMPS text  
Skipping section #IfNotColumnType form\_eye\_neuro ODCOLOR text  
Skipping section #IfNotColumnType form\_eye\_neuro OSCOLOR text  
Skipping section #IfNotColumnType form\_eye\_neuro ODCOINS text  
Skipping section #IfNotColumnType form\_eye\_neuro OSCOINS text  
Skipping section #IfNotRow4D supported\_external\_dataloads load\_type ICD10 load\_source CMS load\_release\_date 2019-10-01 load\_filename 2020-ICD-10-CM-Codes.zip  
Skipping section #IfNotRow4D supported\_external\_dataloads load\_type ICD10 load\_source CMS load\_release\_date 2019-10-01 load\_filename 2020-ICD-10-PCS-Order.zip  
Skipping section #IfMissingColumn patient\_access\_onsite portal\_login\_username  
Skipping section #IfMissingColumn api\_token token\_auth\_salt  
Skipping section #IfMissingColumn api\_token token\_auth  
Skipping section #IfNotIndex openemr\_postcalendar\_events index\_pcid  
Skipping section #IfNotIndex medex\_recalls i\_eventDate  
Skipping section #IfNotIndex medex\_outgoing i\_msg\_date  
Skipping section #IfNotRow2D icd10\_dx\_order\_code dx\_code U071 active 1  
set @newMax = (SELECT MAX(revision) from icd10\_dx\_order\_code)  
UPDATE `icd10_dx_order_code` SET `revision` = @newMax WHERE `dx_code` = ‘U071’  
Skipping section #IfNotRow2D icd10\_dx\_order\_code dx\_code U072 active 1  
set @newMax = (SELECT MAX(revision) from icd10\_dx\_order\_code)  
UPDATE `icd10_dx_order_code` SET `revision` = @newMax WHERE `dx_code` = ‘U072’

Updating global configuration defaults…

Updating version indicators…

Database Patch 2 finished.

OpenEMR Version = 5.0.2(2).

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [April 30, 2020, 5:47am UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/26 "2020-04-30T05:47:07Z")

</div>

Hi @madmax and @jhunyan ,  
Thanks for your quick reports, fix, and testing. Because of that, I was able to replace the patch with a working script (the patch file that folks download will now contain this fix). Thanks!  
-brady

---

<div class="post-metadata">

**Author:** ![PeteBoyd](https://community.open-emr.org/user_avatar/community.open-emr.org/peteboyd/32/14391_2.png) [@PeteBoyd](https://community.open-emr.org/u/PeteBoyd)\
**Post date:** [May 7, 2020, 12:09pm UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/27 "2020-05-07T12:09:59Z")

</div>

I received the following error when testing sql\_patch.php:

"OpenEMR 5.0.2 Database Patch 2

Applying Patch to site : default  
Processing patch.sql …  
INSERT INTO list\_options (list\_id,option\_id,title,seq,is\_default,activity) VALUES (‘apps’,‘oeSignerRemote’,’./…/portal/sign/assets/signit.php’,30,0,0)  
ALTER TABLE `form_eye_neuro` MODIFY `ACT5CCDIST` text  
Query Error

ERROR: query failed: ALTER TABLE `form_eye_neuro` MODIFY `ACT5CCDIST` text

Error: Row size too large (\> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.

…/library/sql\_upgrade\_fx.php at 933:sqlStatement  
…/sql\_patch.php at 66:upgradeFromSqlFile(patch.sql) "

Debian 10  
mariadb-server 10.3

Any help would be very gratefully received. Thanks

---

<div class="post-metadata">

**Author:** ![PeteBoyd](https://community.open-emr.org/user_avatar/community.open-emr.org/peteboyd/32/14391_2.png) [@PeteBoyd](https://community.open-emr.org/u/PeteBoyd)\
**Post date:** [May 7, 2020, 12:41pm UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/28 "2020-05-07T12:41:08Z")

</div>

Running it a second time, instead of “INSERT INTO list\_options…” I get:  
Skipping section #IfNotRow2D list\_options list\_id apps option\_id oeSignerRemote

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [May 19, 2020, 11:20pm UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/29 "2020-05-19T23:20:36Z")

</div>

hi @PeteBoyd ,  
Sorry for the delayed reply. See here for details on that issue:  
[Error Installing Version 5.0.2](https://community.open-emr.org/t/error-installing-version-5-0-2/12806)

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [May 19, 2020, 11:23pm UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/30 "2020-05-19T23:23:15Z")

</div>

Hi,

The 3rd patch for OpenEMR 5.0.2 has been released:  
[https://www.open-emr.org/wiki/index.php/OpenEMR\_Patches](https://www.open-emr.org/wiki/index.php/OpenEMR_Patches)

The patch includes improvements and fixes :

- Patient Portal fixes - reported by and fixed by Jerry Padgett
- MariaDB 10.4 compatibility fix - reported by **travis** and fixed by Brady Miller
- Encounter improvements - by Jerry Padgett
- Calendar improvement - by Stephen Waite
- Billing fix - reported by and fixed by Stephen Waite
- Pharmacy import fix - reported by and fixed by Stephen Waite

-brady

---

<div class="post-metadata">

**Author:** ![PeteBoyd](https://community.open-emr.org/user_avatar/community.open-emr.org/peteboyd/32/14391_2.png) [@PeteBoyd](https://community.open-emr.org/u/PeteBoyd)\
**Post date:** [May 21, 2020, 1:56pm UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/31 "2020-05-21T13:56:43Z")

</div>

@brady.miller Sorry if it’s me not understanding, but having read that post, isn’t the fix for that MariaDB issue in OpenEMR 5.0.2? Where as I’ve already been running OpenEMR 5.0.2.0, 5.0.2.1 and now hitting the issue in trying to install 5.0.2.2?

---

<div class="post-metadata">

**Author:** ![stephenwaite](https://community.open-emr.org/user_avatar/community.open-emr.org/stephenwaite/32/15754_2.png) [@stephenwaite](https://community.open-emr.org/u/stephenwaite)\
**Post date:** [May 21, 2020, 5:27pm UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/32 "2020-05-21T17:27:21Z")

</div>

> <https://github.com/openemr/openemr/commit/0b3bfae1271ecb88b87d2cd820b48f3cf2fd55f2>

---

<div class="post-metadata">

**Author:** ![PeteBoyd](https://community.open-emr.org/user_avatar/community.open-emr.org/peteboyd/32/14391_2.png) [@PeteBoyd](https://community.open-emr.org/u/PeteBoyd)\
**Post date:** [May 22, 2020, 2:18pm UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/33 "2020-05-22T14:18:11Z")

</div>

That says it’s a MariaDB 10.4+ fix, where as I have MariaDB 10.3.22 on Debian 10. I’ve also now tried the upgrade using OpenEMR 5.0.2.3 (OpenEMR 5.0.2 Database Patch 3) and hit the same issue.

---

<div class="post-metadata">

**Author:** ![stephenwaite](https://community.open-emr.org/user_avatar/community.open-emr.org/stephenwaite/32/15754_2.png) [@stephenwaite](https://community.open-emr.org/u/stephenwaite)\
**Post date:** [May 22, 2020, 2:37pm UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/34 "2020-05-22T14:37:10Z")

</div>

what do you see from mariadb when you run

```auto
DESCRIBE form_eye_neuro;

```

---

<div class="post-metadata">

**Author:** ![PeteBoyd](https://community.open-emr.org/user_avatar/community.open-emr.org/peteboyd/32/14391_2.png) [@PeteBoyd](https://community.open-emr.org/u/PeteBoyd)\
**Post date:** [May 22, 2020, 2:39pm UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/35 "2020-05-22T14:39:17Z")

</div>

> [@stephenwaite](#):
>
> DESCRIBE form\_eye\_neuro;

```
+----------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+-------------+------+-----+---------+-------+
| id | bigint(20) | NO | PRI | NULL | |
| pid | bigint(20) | YES | | NULL | |
| ACT | char(3) | NO | | on | |
| ACT5CCDIST | varchar(50) | YES | | NULL | |
| ACT1CCDIST | varchar(50) | YES | | NULL | |
| ACT2CCDIST | varchar(50) | YES | | NULL | |
| ACT3CCDIST | varchar(50) | YES | | NULL | |
| ACT4CCDIST | varchar(50) | YES | | NULL | |
| ACT6CCDIST | varchar(50) | YES | | NULL | |
| ACT7CCDIST | varchar(50) | YES | | NULL | |
| ACT8CCDIST | varchar(50) | YES | | NULL | |
| ACT9CCDIST | varchar(50) | YES | | NULL | |
| ACT10CCDIST | varchar(50) | YES | | NULL | |
| ACT11CCDIST | varchar(50) | YES | | NULL | |
| ACT1SCDIST | varchar(50) | YES | | NULL | |
| ACT2SCDIST | varchar(50) | YES | | NULL | |
| ACT3SCDIST | varchar(50) | YES | | NULL | |
| ACT4SCDIST | varchar(50) | YES | | NULL | |
| ACT5SCDIST | varchar(50) | YES | | NULL | |
| ACT6SCDIST | varchar(50) | YES | | NULL | |
| ACT7SCDIST | varchar(50) | YES | | NULL | |
| ACT8SCDIST | varchar(50) | YES | | NULL | |
| ACT9SCDIST | varchar(50) | YES | | NULL | |
| ACT10SCDIST | varchar(50) | YES | | NULL | |
| ACT11SCDIST | varchar(50) | YES | | NULL | |
| ACT1SCNEAR | varchar(50) | YES | | NULL | |
| ACT2SCNEAR | varchar(50) | YES | | NULL | |
| ACT3SCNEAR | varchar(50) | YES | | NULL | |
| ACT4SCNEAR | varchar(50) | YES | | NULL | |
| ACT5CCNEAR | varchar(50) | YES | | NULL | |
| ACT6CCNEAR | varchar(50) | YES | | NULL | |
| ACT7CCNEAR | varchar(50) | YES | | NULL | |
| ACT8CCNEAR | varchar(50) | YES | | NULL | |
| ACT9CCNEAR | varchar(50) | YES | | NULL | |
| ACT10CCNEAR | varchar(50) | YES | | NULL | |
| ACT11CCNEAR | varchar(50) | YES | | NULL | |
| ACT5SCNEAR | varchar(50) | YES | | NULL | |
| ACT6SCNEAR | varchar(50) | YES | | NULL | |
| ACT7SCNEAR | varchar(50) | YES | | NULL | |
| ACT8SCNEAR | varchar(50) | YES | | NULL | |
| ACT9SCNEAR | varchar(50) | YES | | NULL | |
| ACT10SCNEAR | varchar(50) | YES | | NULL | |
| ACT11SCNEAR | varchar(50) | YES | | NULL | |
| ACT1CCNEAR | varchar(50) | YES | | NULL | |
| ACT2CCNEAR | varchar(50) | YES | | NULL | |
| ACT3CCNEAR | varchar(50) | YES | | NULL | |
| ACT4CCNEAR | varchar(50) | YES | | NULL | |
| MOTILITYNORMAL | char(3) | NO | | on | |
| MOTILITY_RS | char(1) | YES | | 0 | |
| MOTILITY_RI | char(1) | YES | | 0 | |
| MOTILITY_RR | char(1) | YES | | 0 | |
| MOTILITY_RL | char(1) | YES | | 0 | |
| MOTILITY_LS | char(1) | YES | | 0 | |
| MOTILITY_LI | char(1) | YES | | 0 | |
| MOTILITY_LR | char(1) | YES | | 0 | |
| MOTILITY_LL | char(1) | YES | | 0 | |
| MOTILITY_RRSO | int(1) | YES | | NULL | |
| MOTILITY_RLSO | int(1) | YES | | NULL | |
| MOTILITY_RRIO | int(1) | YES | | NULL | |
| MOTILITY_RLIO | int(1) | YES | | NULL | |
| MOTILITY_LRSO | int(1) | YES | | NULL | |
| MOTILITY_LLSO | int(1) | YES | | NULL | |
| MOTILITY_LRIO | int(1) | YES | | NULL | |
| MOTILITY_LLIO | int(1) | YES | | NULL | |
| NEURO_COMMENTS | text | YES | | NULL | |
| STEREOPSIS | varchar(25) | YES | | NULL | |
| ODNPA | varchar(50) | YES | | NULL | |
| OSNPA | varchar(50) | YES | | NULL | |
| VERTFUSAMPS | varchar(50) | YES | | NULL | |
| DIVERGENCEAMPS | varchar(50) | YES | | NULL | |
| NPC | varchar(10) | YES | | NULL | |
| DACCDIST | varchar(20) | YES | | NULL | |
| DACCNEAR | varchar(20) | YES | | NULL | |
| CACCDIST | varchar(20) | YES | | NULL | |
| CACCNEAR | varchar(20) | YES | | NULL | |
| ODCOLOR | varchar(50) | YES | | NULL | |
| OSCOLOR | varchar(50) | YES | | NULL | |
| ODCOINS | varchar(50) | YES | | NULL | |
| OSCOINS | varchar(50) | YES | | NULL | |
| ODREDDESAT | varchar(20) | YES | | NULL | |
| OSREDDESAT | varchar(20) | YES | | NULL | |
+----------------+-------------+------+-----+---------+-------+

```

---

<div class="post-metadata">

**Author:** ![stephenwaite](https://community.open-emr.org/user_avatar/community.open-emr.org/stephenwaite/32/15754_2.png) [@stephenwaite](https://community.open-emr.org/u/stephenwaite)\
**Post date:** [May 22, 2020, 2:41pm UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/36 "2020-05-22T14:41:09Z")

</div>

you upgraded from `5.0.1` to `5.0.2`?

could rerun the upgrade script and choose 5.0.1 and see if it changes those columns to text

---

<div class="post-metadata">

**Author:** ![PeteBoyd](https://community.open-emr.org/user_avatar/community.open-emr.org/peteboyd/32/14391_2.png) [@PeteBoyd](https://community.open-emr.org/u/PeteBoyd)\
**Post date:** [May 22, 2020, 2:54pm UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/37 "2020-05-22T14:54:09Z")

</div>

This was a fresh install of 5.0.2.1. (I have another server on which I did a 5.0.1 to 5.0.2.1 upgrade and hit the form\_eye\_mag\_orders issue.) I’ll try what you suggest though, thanks.

---

<div class="post-metadata">

**Author:** ![PeteBoyd](https://community.open-emr.org/user_avatar/community.open-emr.org/peteboyd/32/14391_2.png) [@PeteBoyd](https://community.open-emr.org/u/PeteBoyd)\
**Post date:** [May 22, 2020, 3:17pm UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/38 "2020-05-22T15:17:18Z")

</div>

> [@stephenwaite](#):
>
> could rerun the upgrade script and choose 5.0.1 and see if it changes those columns to tex

How do I “choose” that please?  
Presumably you mean I’m going to somehow cause it to run sql/5\_0\_1-to-5\_0\_2\_upgrade.sql?

In case it’s worth noting, as per installation instructions I have this in place:  
sudo chmod 644 library/sqlconf.php  
sudo chmod 600 acl\_setup.php  
sudo chmod 600 acl\_upgrade.php  
sudo chmod 600 setup.php  
sudo chmod 600 sql\_upgrade.php  
sudo chmod 600 gacl/setup.php  
sudo chmod 600 ippf\_upgrade.php

And:  
sudo chmod 600 admin.php  
sudo chmod 600 sql\_p

(I’m in the OpenEMR Slack workspace if that’s more convenient)

---

<div class="post-metadata">

**Author:** ![stephenwaite](https://community.open-emr.org/user_avatar/community.open-emr.org/stephenwaite/32/15754_2.png) [@stephenwaite](https://community.open-emr.org/u/stephenwaite)\
**Post date:** [May 22, 2020, 3:18pm UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/39 "2020-05-22T15:18:01Z")

</div>

the upgrade script let’s you choose the version in the dropdown

---

<div class="post-metadata">

**Author:** ![PeteBoyd](https://community.open-emr.org/user_avatar/community.open-emr.org/peteboyd/32/14391_2.png) [@PeteBoyd](https://community.open-emr.org/u/PeteBoyd)\
**Post date:** [May 22, 2020, 3:26pm UTC](https://community.open-emr.org/t/openemr-5-0-2-patch/13007/40 "2020-05-22T15:26:53Z")

</div>

sql\_patch.php just runs, gives no options. Did it once give a drop-down, and I’ve forgotten, and it’s now set something in a config file that I need to reset? Am I confused and I should be running sql\_upgrade.php instead?

[Previous page](https://community.open-emr.org/t/openemr-5-0-2-patch/13007.md?page=1)

[Next page](https://community.open-emr.org/t/openemr-5-0-2-patch/13007.md?page=3)
