Yii Framework Forum: Yii_Env For Console Commands? - Yii Framework Forum

Jump to content

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

Yii_Env For Console Commands?

#1 User is offline   amnah 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 67
  • Joined: 23-February 13

Posted 21 January 2014 - 11:15 PM

Just tried to run a migration, but it seems like it picked up my production config instead of staging. Looking through the code, there's no YII_ENV explicitly set so it defaults to "prod".

What's the proper way to set YII_ENV for console commands? For now, I just hacked the @app/yii file directly.
0

#2 User is online   CeBe 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 361
  • Joined: 16-July 10
  • Location:Berlin. Germany

Posted 22 January 2014 - 04:00 AM

defining it in the @app/yii file is just how you do it. set the constant before loading yii so yii will not take the default but your value.
0

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