I followed the excellent tutorial on
http://www.jakusys.de/blog/2008/09/grails-and-liquibase-how-to-use/
in regard to my dev database on local machine where grails is installed. All went well.
Now I want to deploy grails war to remote website where I setup mysql on remote server.
But I am at loss now. How do I apply the command:
grails migrate
so that the now the remote database has the DATABASECHANGELOG table.
In the database there is some production data that I will manually copy from my local mysql to fresh install of remote mysql database while most of other tables are fresh and have no data. I am waiting for reply to this question to make sure I don't mess up something before actually launch my grails application on remote production server.
You can migrate a remote DB from your computer, using grails.env variable, like:
grails migrate -Dgrails.env=production
Related
I am currently working on a project where I use Postges inside a Docker and manage it via Flask-Migrate but only during development.
My goal is to use a database directly on a VPS in production.
Can I create migration scripts on the Docker databse and then copy them to run on the VPS database?
Your migration scripts will be stored with your source code, not inside the Docker container where the database is. So it really does not matter, as long as you set the database connection URL properly you can generate and apply the migrations on any supported database, be it hosted on a container or a VPS.
I recently followed a tutorial on getting started with WordPress which included installing a WAMP Server.
Some days later I checked on a Java program that I'm working on which connects to a local database, but it could no longer connect to that database, and if i checked in the MySQL WorkBench or DataGrip it seemed as in that database did not exsist anymore, and it only showed my database from my WordPress project, all the other local databases i had made before installing WAMP are gone.
Is there any way to find them?
EDIT: They DO exist in the folder C:\ProgramData\MySQL\MySQL Server 5.7\Data but I don't know how to access them, as they're not working in my Java program, or not showing in the WorkBench as schemas anymore
You now have 2 MYSQL Servers installed and therefore which ever one is started first will be the one that phpMyAdmin or Workbench talks to.
To get to your old database, just stop the wampserver MySQL server
[left click] wampmanager -> MYSQL-> Service Administrator->Stop Service
Then go into the services snapin
Windows Key+R
Enter services.msc
Press the OK button
Find the service called MYSQL and start that.
You should now be able to access the old database using phpMyAdmin or WorkBench
Backup the old database
Then from the services snapin agian STOP the MYSQL service.
Restart the WAMPServer MySQL
[left click] wampmanager -> MYSQL-> Service Administrator->Start Service
Now restore your database into the WAMPServer version of MySQL.
Once this is completed, you can uninstall the old MySQL Server instance.
While waiting for a MSSQL backend compatible with Django 1.6, I've been doing development using SQLite and using South to keep my models synced with the DB.
Now that django-mssql v. 1.5 (which supports Django 1.6) is available, I'd like to move my Django models to a SQL Server database. Note that there is only test data in my SQLite database, so there's no need to migrate the data - I'm only interested in implementing the models in SQL Server, and using South to implement schema modifications going forward.
I think the proper procedure after installing django-mssql is:
Change the settings.py to point to the MSSQL database per the
django-mssql installation instructions
Remove all of the existing South migrations and the migrations
folder
Run manage.py syncdb
Run manage.py schemamigration --initial <application_name>
Run manage.py migrate <application_name>
Have I missed anything?
I have a deployment system where updates are performed locally and pushed up to production using Git and CI. Now I do this ok with Wordpress and Drupal as they both have the option of upgrading the database on the production server. However I can not find how to do this on Joomla. I do not want to copy the database from my local to production. It needs to be sync down only as users are making changes as I am doing the upgrade.
I am looking for a means to use Git deployment on Windows Azure together with either their MySQL or other database solutions.
I need a means of migrating database schema changes as part of deployment - does Azure provide support for this without using Visual Studio or .NET.
You basically want to use Azure as a Continuous Integration (CI) platform and my view is that Azure by itself just isn't there yet.
A basic git based CI scenario would involve the following steps.
Your src code and any database schema/data updates are pushed to a central git repository like GitHub. [Feature available]
GitHub would then push the updates to Azure. [Not supported in Azure until they support GitHub hooks]
Azure compiles and deploys the code. [Supported]
Azure updates the database from sql files pulled from the repo (remember, this needs to be automated). [Not supported]
Azure reports any error in running the database or web application. [Supported]
Azure runs user provided integration tests to check more thoroughly specific functionality and reports the status of those tests to the user [Not supported].
Azure allows you to roll back to a previous deployment snapshot [Partly supported. Snapshots are not based on git commits for instance].
I might be wrong on some of those points or new features might be added since I've written this. Corrections are very welcomed and I'll try to update the list accordingly.
I am not sure how much experiences you have with Windows Azure Websites, however when you are creating a Windows Azure Websites, you have ability to use SQL Azure Database or MySQL cloud database directly integrated with your Windows Azure Websites.
So if you will use SQL Azure Database then there are several ways you can migrate your DB following the link here:
Migrating Databases to Windows Azure SQL Database (formerly SQL Azure)
To manage MySQL you can use Local Web Server to do it. The way I have done is to use PHP, the MySQL Command-Line Tool (part of MySQL), and a web server set up on my local machine, and that I have enabled the PDO extension for MySQL. This way I can manager my MySQL directly from my own local machine and the details are explain at the bottom of this article:
Create a PHP-MySQL Windows Azure web site and deploy using Git.
Also the SQL part you can write in Workbench if you use MySQL and Oracle SQL Developer if you use Oracle SQL.
Finally Git Deployment allows you to deploy your any kind of application directly to Windows Azure without using VSx.