Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Updating a component 31 May 2014 19:21 #12462

  • dyvel
  • dyvel's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 200
  • Thank you received: 11
Hi

When I download and install a component that is already installed on my Joomla site, then any changes I've made to the database is not being updated despite I delete the database tables affected.

I understand that the database is not being updated if the table exists but according to the file install.mysql.utf8, it should create the tables if they don't exists.
When I develop, I just delete the tables I've made changes to, and the install the component on top of the old one, so other table data is not lost. But even though the install mysql file writes: CREATE TABLE IF NOT EXISTS, then the tables is not created even though they don't exists.

They are only created if I completely uninstall the component and reinstall it.

Please Log in or Create an account to join the conversation.

Updating a component 13 Oct 2014 10:03 #12693

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Hi dyvel,

I have now created a new feature to comply to this request.
In facts, there isn't any possibility to execute the same install script at install AND at update.
So, I placed it in the sql/update folder, and it works like a charm. (but it is triggerred only on version changes)

Everytime you want to upgrade your database, you just need to increase its version number in the project properties, and then delete the tables you want to upgrade manually before to update it.

For the moment, it does not take automatically in consideration your DB changes, so as you see, it will recreate automatically.

For datasets
If you have a dataset, then you can take the SQL declaration in the sql folder and exec it manually. (you only have to rename the tables prefixes.)
Coding is now a piece of cake
The following user(s) said Thank You: dyvel, dyoungers

Please Log in or Create an account to join the conversation.

Last edit: by admin.
  • Page:
  • 1
Time to create page: 0.071 seconds

Real time saver and great Component Builder tool ! I have been developing with J-Cook Pro Component Builder for several months now and can say with all honesty that this product/service is second to none. The product is feature rich and is being improved and added to all the time. Do yourself a favor if you need to build a Joomla! Component then you can do no wrong in trying the product. You will save on time and effort while being able to deliver your project on time. J-Cook pro does the hard work for you you then have the freedom to fully customise the end result for your own needs. 

One word: Awesome.
Edwardcox (JED)
         

Get Started