• 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.
  • Chevereto Support CLST

    Support response

    Support checklist

How to create a Chevereto user or other operations in the database?

1200

Chevereto Member
I want to reconstruct the Chevereto image program, but I don't want to completely discard the old Chevereto data, How do I write some of the data from the old Chevereto image site in a newly created Chevereto site database?

For example, I just want to write a piece of user data on the old Chevereto image website database into the newly created Chevereto image website database.
For example, I also want to restore the index link data of a picture on the old Chevereto image website.

How should the above mentioned be implemented?

In addition, such as the number of image views, popular, recent, moving pictures and other data recovery and so on.

Finally, I also want to know what kind of function each data table in the chevereto database has played?
 
What you are asking is not that trivial as you may think. The data is in a relational database, which means that the data relates to something meaning that you can't expect to simply inject database records neither import old records if you don't keep the data relations.

For example, the chv_logins table is related to the chv_users table, same as chv_images, chv_albums, etc. Long as you keep the data relations in place, the system should work as expected.

All the content related classes (class.image.php, class.album.php, etc) include wrappers to interact with the database for all CRUD operations, so in the case you really want to inject something I suggest you to use these wrappers.

Keep in mind that the system wasn't designed for the kind of data merging that you want to achieve, I can't give you any instructions on how to achieve exactly what you need because there's no procedure for such thing.
 
What you are asking is not that trivial as you may think. The data is in a relational database, which means that the data relates to something meaning that you can't expect to simply inject database records neither import old records if you don't keep the data relations.

For example, the chv_logins table is related to the chv_users table, same as chv_images, chv_albums, etc. Long as you keep the data relations in place, the system should work as expected.

All the content related classes (class.image.php, class.album.php, etc) include wrappers to interact with the database for all CRUD operations, so in the case you really want to inject something I suggest you to use these wrappers.

Keep in mind that the system wasn't designed for the kind of data merging that you want to achieve, I can't give you any instructions on how to achieve exactly what you need because there's no procedure for such thing.
Does that mean re-creating a Chevereto website means that everything starts again?
 
I said that the database has relationships that you must either update, generate, remove, etc. in order to achieve what you need. How you modify these relations depends entirely on the data-set you have and what you want to get from it.

I suggest you to examine the SQL table structure present in app/install/sql/ to get a better idea.
 
Back
Top