How can we update or sync database assets table? - pimcore

When we modify image assets on pimcore.asset.storage, how can we update or sync database assets table?
We modified pimcore.asset.storage setting another folder but pimcore not refreshes new data on admin.
directory: '%kernel.project_dir%/public/var/assets/catalog'

This is not how it's supposed to work. The sync only goes one way from Pimcore to the storage, not the other way around.

Related

Delete Repository and history

I had to upload my php code to my GitLab project for my university class. Unfortunately I uploaded the wrong data and now I just want to delete all of the data again und upload my new correct data. When I deleted the data manually I still be able to see them in the history. So is there a way to just delete everything I just uploaded? And I am not allowed to delete the whole project because other members have some subprojects.
I am using Windows 10 by the way.
Thanks a lot!

Coredata migration is really needed?

I have a SQLite database with two columns it is bundled in the app. There is no write or save interaction in the database, it is fixed and read only. I read some documents and tutorials about the lightweight/manual migration all make it clear that you have to save the user data when migrating, that is not my case I don't need to save user data, I will deploy a new app version with a new database. I want to add two new attributes to my database and use in the app. Why I have to migrate? Why can't I just delete the old three files of SQLite database and add the new one and use the new attributes as needed. So I tried and did not work, anyone here to give me the steps to make the app to recognize the new database?
Actually the way to delete the SQL database files is the right way.
But you have to do that before the Core Data stack is going to be initialized.

Upgrading from CouchDB 1.2.x and separating views

We are in the process of upgrading from 1.2.x to 1.5.1 and would like to take advantage of the fact that you can now store databases and views in separate locations. Everything I've read so far indicates all you have to do is set the view_index_dir property. However since we are upgrading from a time before this feature was available I'm worried this wont work because when I look at our current data directory I only see one file per database. To put it simply, will it be possible for us to relocate our views?
In your current data directory, you should have a data base file named
<databasename>.couch
and a view folder folder named
.<databasename>_design
per data base.
For migration, just stop the data base, move the view folders to the new location, configure the new location in the local.ini (property view_index_dir) and restart the data base.

Recover Deleted Data Table Azure Mob Service

I accidentally deleted a table from Data of Mobile Service. Is there any way I can recover it?
I used the default free database given with making a mobile service. I really do not care about the data in table, instead I really want the scripts than ran on it.
.........................................
In order to retrieve the data I did the following:
Cloned the mobile service, reverted it to a previous commit, copied the deleted table and its script files, pulled again from the server, added the table and the script files where they should be, added the files to git tracking index, pushed the commit to master
Now the files are there in the azure mobile service, but the table is not being displayed in the GUI.
I tried to restart the azure mobile service but still it is not there.
In order to confirm the table and its files were indeed there I even cloned the mob service again and this time in the table folder I had users.json and its script files, but sadly they are not visible in azure portal
To get the table to show again in the UI, you need to use the portal create table command. It will basically noop if it detects the table already exists in SQL. I don't believe it will touch your table scripts, however it may override the .json permissions file.
If it does override the js files, then after creating the table through the UI you can revert the commit that changed the json/js table files as part of that process.
At that point you should be good again.

duplicating modx revo install

I'd like to do some changes to a modx revo install through a staging subdomain, with a separate database. What's the easiest way of doing this? I've been battling with this for two days.
I'm trying a new install now and replacing content, components and database content
I end up moving/duplicating MODX sites between live and staging subdomains several times per week. Here's how I do it.
MySQL
Create a new blank staging database
Make sure you MySQL user can access the new databse
Export/Backup your live database
Import the backup to your new/staging database
Files
Download the matching version of MODX from http://modx.com/download/previous-releases/ because you'll need the /setup/ directory (hopefully you didn't leave that on your server previously).
Copy the entire content of the 'public_html or 'www' folder over to the staging subdomain folder. Don't forget the .htaccess file which is sometimes hidden.
Upload the setup folder to your staging location on your server just like it would be found in a clean MODX install.
Update the three config.core.php files from the top directory, /connectors/, and /manager/ to update the "MODX_CORE_PATH" to the correct directory for staging.
Update the 'core/config/config.inc.php' file. You'll need to update the database details and every instance of your directory structure to match the new staging location.
Run Setup
Run by going to staging.domain.com/setup
If you get ant errors during setup it probably means that you missed something that needed updating in one of the inc.php files.
It's actually very similar to moving the site from one server to another except duplicating to a subdomain on the same server instead. MODX has instructions for moving to a new server at http://rtfm.modx.com/revolution/2.x/administering-your-site/moving-your-site-to-a-new-server
There is another method to solve this problem.
Create new database & user for your sub site.
There is nice github repo. There you can find MODX install script which runs via cli. You'll get a new installed version of MODX in the end.
Install Vapor package from official repo to your old site. Then run vapor script from it via cli. It creates a new package with your whole site dump (You should check dependencies for xpdo objects in this script. For ex. you can copy all the stuff except users or anything else).
After all copy new package to core/packages at new site and install it.
Dump is ready :)

Resources