Yii Framework Forum: Add migrationPath to migration history - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Add migrationPath to migration history Rate Topic: -----

#1 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 03 April 2011 - 03:41 PM

Hi,

I stumbled upon a problem, while playing around with database migrations.
I tried to use database migration to install and manage application and module schemas.

Here's my tbl_migrations, the comments show the usage of --migrationPath:

version	apply_time
m000000_000000_base	1301774157
m110403_200500_test	1301861116  # (default) application.migrations
m110402_195159_init	1301861252  # application.module.user.migrations


Now I've tried to migrate down the application.module.user.migrations with:
protected/yiic migrate down --migrationPath=application.modules.user.migrations


Yii Migration Tool v1.0 (based on Yii v1.1.8-dev)

Total 1 migration to be reverted:
    m110403_200500_test

Revert the above migration? [yes|no] y
*** reverting m110403_200500_test


But then got this PHP Error[2]: require_once(/path/to/app/protected/modules/user/migrations/m110403_200500_test.php): failed to open stream: No such file or directory

Because the command looks for the latest migration.
But it would be very cool to filter the migrations by migrationPath, because then we could handle the migrations in one table, a workaround would be also using --migrationTable.

Would it be possible to add a third column to tbl_migrations?


Best regards,
schmunk
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#2 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 14 April 2011 - 08:54 AM

Bump?
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#3 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 03 June 2011 - 04:54 PM

Thanks, I already did it lik that :lol:
http://www.yiiframew...sion/p3widgets/
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users