• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Danger: on update CURRENT_TIMESTAMP

Deffe

Chevereto Member
Hi Rudolf and other developers, just a warning from my experience.

So I was modifying my version, making a few improvements and updates. Added a new column to the table and updated the picture table with correct data in the column I just added.

Went to the page to view the changes. And everything was gone.

on update CURRENT_TIMESTAMP
had changed the date of the column for all respective pictures resulting in that all pictures was gone.

Luckily I was able to write a script that just simply located the files and updated the database with the correct date again (recursive search the dir for the file and then explode the dirs to get the date).

Now Im concidering to create a sepperate table for my column, making it a real plugin. But I think that was a scary thing. Its not wrong to do as you did, It might even be the correct way to ensure that it always updates. But I just had a horrible experience with it.
 
Hi Rudolf and other developers, just a warning from my experience.

So I was modifying my version, making a few improvements and updates. Added a new column to the table and updated the picture table with correct data in the column I just added.

Went to the page to view the changes. And everything was gone.

on update CURRENT_TIMESTAMP
had changed the date of the column for all respective pictures resulting in that all pictures was gone.

Luckily I was able to write a script that just simply located the files and updated the database with the correct date again (recursive search the dir for the file and then explode the dirs to get the date).

Now Im concidering to create a sepperate table for my column, making it a real plugin. But I think that was a scary thing. Its not wrong to do as you did, It might even be the correct way to ensure that it always updates. But I just had a horrible experience with it.

If I am to understand you, you are saying that when you updated the bd, the date column got updated and chevereto could not find the path anymore to the files?

If this is true, this is a serious error.

Thank you for the report, I will look into it.
 
If I am to understand you, you are saying that when you updated the bd, the date column got updated and chevereto could not find the path anymore to the files?

If this is true, this is a serious error.

Thank you for the report, I will look into it.

Yeap, its a good solution if it is a locked system where no external modifications are made. But since the system is administrated and developed by all site owners it could result in alot of trouble for those that just simply perhaps want to make a batch update of all pictures for variuse reasons...

Im just happy that I know php and unix and I was able to correct it.
 
This is because when the db gets created the structure have this line:
Code:
image_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP

You have to edit the database structure to remove the ON UPDATE CURRENT_TIMESTAMP. I've removed that for 2.4.4
 
Back
Top