Yii Framework Forum: Using Yii2 migrations in Symfony - Yii Framework Forum

Jump to content

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

Using Yii2 migrations in Symfony Rate Topic: -----

#1 User is offline   Jochen Daum 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 25-January 17

Posted 25 January 2017 - 09:08 PM


I'm new to Yii, but based on the recommendation of an experienced Yii user I'd like to use Yii2 migrations in my Symfony projects. This is mainly because they support going and back and forward 1,2,3 steps, rather than requiring to know the datestamp in doctrine migrations.

To get this going I first tried to install yiisoft/yii2 with composer. What I found however is that all migrations are then created in my vendor folder: /vendor/yiisoft/yii2/console/migrations

I could not find any documentation on how to configure different folders for this.

As a second step I created a Yii application and then simply copied some files around. I'd like to have feedback if there is a better way to do this.

My steps

  • add missing composer.json entries to my symfony composer.json and run composer update
  • copy yii file to symfony root folder as yiic
  • copy config folder to symfony root
  • configure database in config/db.php

Any feedback would be appreciated

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,225
  • Joined: 17-January 09
  • Location:Russia

Posted 26 January 2017 - 03:46 AM

There's https://github.com/y...troller.php#L44 property with default value of `@app/migrations`. I guess you need to set it.
Yii 2.0 Development Cookbook

Enjoying Yii? Star us at github

Support me so I can work more on Yii: https://www.patreon.com/samdark

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