database-migration

What is a good workflow for database migration in Grails?

淺唱寂寞╮ 提交于 2019-12-12 08:09:50
问题 I want to use the database-migration grails plugin for database migration. When I start my Grails app the first time all the database tables are created automatically. The production setting in my DataSource.groovy is: production { dataSource { dbCreate = "update" url = "jdbc:mysql://localhost/myapp?useUnicode=yes&characterEncoding=UTF-8" username = "test" password = "test" dialect = org.hibernate.dialect.MySQL5InnoDBDialect properties { validationQuery = "select 1" testWhileIdle = true

Doctrine2 Migration Using DBAL instead of $this->addSql

橙三吉。 提交于 2019-12-12 07:45:29
问题 So I've done a bunch of Doctrine2 migrations (https://github.com/doctrine/migrations) but I have a question for a new migration I'm trying to do. I've been digging into the library a little and I see that $this->addSql() is used to build a list of SQL to execute and then it gets executed later. I wanted to do something where I select some data, iterate over the rows, insert new data based on that, and then delete the data I selected. This lends itself to the DBAL library pretty easily, but I

Migrating databases using phpMyAdmin's tracking mechanism

筅森魡賤 提交于 2019-12-12 07:09:46
问题 In a development database, I have phpMyAdmin Tracking enabled on all tables. It logs all the changes I make to the tables' structures (in this case I'm not interested in data tracking.) So far so good. What I want to do then is to take out a report, for ALL tracked tables, with the changes made from a specific version (or a date would even work,) so that I can run the resulting SQL on my production database, when upgrading to new versions, and make sure that the databases are identical,

How to loop through child elements of XML type data column in talend

时光怂恿深爱的人放手 提交于 2019-12-12 06:16:10
问题 I want to migrate data from an old table which has one column which has data in XML form. I am trying to break the XML using talend but always getting the first element again and again. This is the data i have in my OLD DB: ID DETAIL 1 <ORDER_DETAIL> <PACK> <ID>703</ID> <NAME>iPhone 6-16 GB-Space Grey-KD 57 Pack</NAME> <STANDALONE_PRICE>0</STANDALONE_PRICE> <MONTHLY_PRICE>57</MONTHLY_PRICE> <UPFRONT_PRICE>0</UPFRONT_PRICE> <ITEMS> <ITEM> <ID>177</ID> <NAME>Bundle_2500_30GB_UNLIMITED</NAME>

Migrating from Heroku to Azure - getting the database migration right

坚强是说给别人听的谎言 提交于 2019-12-12 04:59:23
问题 I have a Django app live on Heroku. I'm migrating it to Azure, taking advantage of the $120K/yr credit they recently offered me. Here's what I've done so far: i) I created an Azure VM with Ubuntu (Standard_D1). ii) I installed postgresql on it (my db of choice) iii) I pulled my Heroku app's files from my github onto the Azure VM. iv) I created a postgres DB on the Azure VM, and then ran syncdb to create the required tables. v) I tweaked postgresql.conf and pg_hba.conf to cater to some tuning

AlterField on auto generated _ptr field in migration causes FieldError

孤者浪人 提交于 2019-12-12 04:32:24
问题 I have two models: # app1 class ParentModel(models.Model): # some fields Now, in another app, I have child model: # app2 from app1.models import ParentModel class ChildModel(ParentModel): # some fields here too In initial migration for app2 django creates OneToOneField with parent_link=True named parentmodel_ptr . Now I want to change this auto generated field to let's say IntegerField , so I create new migration with this operations: class Migration(migrations.Migration): dependencies = [ (

Transfer Access DB to SQL Server DB using SSIS

丶灬走出姿态 提交于 2019-12-12 03:13:54
问题 How can I transfer a full database from Access to SQL Server 2012 using SQL Server Integration Services? 回答1: Yes you can do this. You need BIDS and just create a control flow and task flows with what you want to do. SSIS is simple drag and drops for the most part 回答2: Another solution is to use the Import/Export wizard. Simply right click on a database in SQL Server, choose Tasks > Import Data. The wizard will walk you through the setup. At the end you can save the package which then can be

Generation of ROWID column in triggers even when its generation is switched off in SSMA v 6.0

房东的猫 提交于 2019-12-12 02:46:13
问题 I used SSMA v6.0 for migrating my Oracle database to SQL Server 2014. I turned off the generation of ROWID column and as expected it did not generate any additional ROWID column in any of my tables after conversion, but surprisingly it DID generate all the triggers associated with their respective tables with ROWID column infused in triggers like following: USE [DBName] GO /****** Object: Trigger [dbo].[InsteadOfInsertOn$ROLEPERMISSIONS] Script Date: 3/11/2015 10:58:46 AM ******/ SET ANSI

Migrating Wordpress database to server SQL error

蓝咒 提交于 2019-12-12 01:58:04
问题 I have just finished a Wordpress site and I'm trying to set it up on the server. I did the following, as always: uploaded a .htaccess file to a public_html folder with the text from https://codex.wordpress.org/htaccess (basic WP) moved all the contents from the local wordpress folder to public_html exported my local database and changed all instances of 'localhost/siteName/wordpress' with 'www.siteAddress.com' created a mySQL database in cPanel's mySQL section created a new user in cPanel's

Best way to generate proper markup for inserting into WordPress from PHP (importing from another CMS)

偶尔善良 提交于 2019-12-12 01:14:59
问题 I was assigned to import a large amount of content from a certain database, which belongs to a proprietary CMS system, to a new installation of WordPress. After writing a nice PHP script to retrieve entries and insert them using the wp_insert_post() function, I'm now stuck with a problem. What I want to do is to "filter" my input string, which is the source content, to fit the format used natively by WordPress when content is copy-pasted to the built-in editor. For instance, this is how it