Yii Framework Forum

Migrationsss


(Pedroguarimata) #1

hi all, yii2

when making a migration indicating the [color="#008000"]migrationPath[/color], for example:


$./yii migrate --migrationPath=modules/foo/migrations

Yii does not save the migration path used in migration :unsure: So when I run the command down, I have to specify the [color="#008000"]migrationPath[/color] for each migration. but when many migrations, this becomes a problem

When i run the command without the parameter [color="#008000"]migrationPath[/color] in a migration that is not in the default directory y get the exception


failed to open stream: No such file or directory'

obviously :rolleyes:

with many migrations and modules do this is difficult, I think you should store the migrationPath Yii used for each migration. :D

something like change the migration table to :


CREATE TABLE migration (

  	version varchar(180) PRIMARY KEY,

  	path varchar(x),

  	apply_time integer,

  )



if there is a way to do it and I let me note. :mellow: thk :)


(Pedroguarimata) #2

in github yii2/issues/9698