How to store scripts folders on OneDrive
Last modified: July 4, 2024
This guide is a detailed step-by-step walkthrough on how to move a database scripts folder to OneDrive and keep it up-to-date with the help of dbForge Schema Compare for MySQL.
Workflow
- Set up OneDrive on Windows
- Create a scripts folder and store it on OneDrive
- Compare and synchronize a scripts folder stored on OneDrive with a live database
Set up OneDrive on Windows
Note
OneDrive comes preinstalled on Windows 10 and Windows 11.
1. Open it from the Start menu.
2. Enter the email address associated with your OneDrive account and click Sign in.
3. Enter your password and click Sign in again.
Note
OneDrive may require additional verification and send a special security code to your associated email. If that happens, go to your email, get the security code, enter it, and move on.
4. Specify a location for your OneDrive folder.
5. If you previously set up OneDrive on your machine, you might already have an existing OneDrive folder. In that case, click Use this folder.
6. Optional: Go through several additional pages.
Afterward, your OneDrive files and folders will appear in File Explorer.
Now, you are ready to use OneDrive as a storage for your scripts folder.
Create a scripts folder and store it on OneDrive
You have two ways to create a new scripts folder in dbForge Schema Compare for MySQL:
- Create a scripts folder using the Create Scripts Folder dialog
- Create a scripts folder by synchronizing a MySQL database with an empty folder
To create a scripts folder using Create Scripts Folder
1. On the ribbon, select Database > Create Scripts Folder to open the Create Scripts Folder or Snapshot dialog.
2. In the dialog, select Database as a source type, a server connection, a database name, Scripts Folder as a destination type, and the path to OneDrive where your scripts folder is saved.
3. Optional: Click Scripts Folder Structure to customize the structure for your scripts folder and file name templates.
4. Click Create to create all database objects and store them in your new scripts folder on OneDrive.
To create a scripts folder by synchronizing a MySQL database with an empty folder
1. On the toolbar, click New Schema Comparison to open the New Schema Comparison wizard.
2. On the Source and Target page of the wizard, select Database as a source type, the required server connection, and the database.
3. Under Target, select the Scripts Folder type and set a path to an empty folder on your OneDrive in the Database scripts folder field.
3. Click Compare to run the schema comparison.
4. In the comparison results grid that opens, all objects are selected for synchronization by default. To exclude the objects, clear the checkboxes next to the objects you do not want to add to the scripts folder.
5. On the ribbon, select Comparison > Synchronize. Alternatively, select the required objects in the grid, right-click them, and then select Synchronize.
6. In the wizard that opens, select Update the scripts folder and click Synchronize to run synchronization.
Compare and synchronize a scripts folder stored on OneDrive with a live database
In our scenario, we have a live development database and want to sync our scripts folder that resides in the cloud with that database. The logic behind this is to regularly run schema and data comparison between the database and the scripts folder. In case any differences are found — deploy them.
You can automate the process of schema comparison and synchronization by using the command line. Automation of data comparison and synchronization is also possible.
Note
To learn more about moving your scripts folders to OneDrive, refer to our blog post Using OneDrive to Store Scripts Folders for dbForge Schema Compare.
- How to store scripts folders on OneDrive
- Set up OneDrive on Windows
- Create a scripts folder and store it on OneDrive
- To create a scripts folder using Create Scripts Folder
- To create a scripts folder by synchronizing a MySQL database with an empty folder
- Compare and synchronize a scripts folder stored on OneDrive with a live database