0

I am using CakeDc Migrations plugin for database migration. my application is using two databases. so configured it in database.php. I have written many migrations which co-ordinate with the database1(default connection ) and its working fine. Now I want to write one migration which co-ordinate with database2(I want to run these queries only on database2 ) . how Can I differentiate? at what level ?

Thank you.

Ganesh Patil
  • 670
  • 1
  • 5
  • 22

1 Answers1

0

Just read the help text and documentation.

--connection, -c           Overrides the 'default' connection of the
                           MigrationVersion
--migrationConnection, -i  Overrides the 'default' connection of the
                           CakeMigrations that are applied

There are more options, just type cake migrations.migration and read what it shows. There is also a lot documentation in the /Docs folder.

floriank
  • 25,546
  • 9
  • 42
  • 66
  • Thanks for your answer. but I am using above options and it is executing migrations on that new db as well. but I want to write migrations itself for different connections. here using above option it will execute all migrations on both databases. I want seperate migrations for these two databases. – Ganesh Patil Jul 28 '14 at 12:28