Jump to content

Updating data in a database table when installing a new version of an app


Go to solution Solved by Adriano Faria,

Recommended Posts

Posted

In the new version of one of my apps, I want to update a new field that I have created (Database Schema) with a value. I used the upgrade.php file and wrote the necessary codes in the step1 method, but it does not work. what should I do?

Posted
11 minutes ago, Adriano Faria said:

Have you increased the long version and tried to upgrade?

 

No, i tried on my live website that had old version. didn't work

 

12 minutes ago, Adriano Faria said:

You need to install the old version of the app somewhere else and then upload the new version.

I did, but it doesn't work.

Posted
4 minutes ago, Adriano Faria said:

If you didn't increase the long version, it won't upgrade.

Basically because you're installing/upgrading to the same version. In that case, the upgrade.php won't run.

so what should i do ?

  • Solution
Posted

In the Dev Center, add the upgrade.php in the Version currently being developed version then build application and choose Build New Version. The ID Number (long version) should be higher than the version you have in marketplace. You should change the Version (human version) too but that's not required.

Save. Download. Test in another install.

Posted
12 minutes ago, Adriano Faria said:

In the Dev Center, add the upgrade.php in the Version currently being developed version then build application and choose Build New Version. The ID Number (long version) should be higher than the version you have in marketplace. You should change the Version (human version) too but that's not required.

Save. Download. Test in another install.

SOLVED! 
The issue was with the ID Number. 
 

Thanks

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...