CTOlet / yii2-attachments

Yii2 extension for uploading and attaching the files to the models
66 stars 57 forks source link

Migrations fail with message class not found #54

Closed philippfrenzel closed 7 years ago

philippfrenzel commented 7 years ago

Hi, since your namespace cleanup, the migrations aren't working anymore. I'm not able to solve it, as you are using the getModule function within the migrate to retrieve the table name from the config - do you have an idea how to fix this?

Thanks Philipp

philippfrenzel commented 7 years ago

Hi, pls. see:

https://github.com/dmstr/yii2-migrate-command/issues/19

It looks like the class is not registered in the global namespace

schmunk42 commented 7 years ago

It's more a Yii2 issue I think, see https://github.com/yiisoft/yii2/issues/384 There was a discussion about implementing this via Yii app params, but now it's done via namespaces.

schmunk42 commented 7 years ago

You need to require Yii >= 2.0.10, when using namespaced migrations. See also https://github.com/yiisoft/yii2/issues/13356

CTOlet commented 7 years ago

Install 1.0.0-beta.2 of that ext if you have not to upgrade yii -> 2.0.10

schmunk42 commented 7 years ago

@philippfrenzel That's the way to go then, since this extension is in beta, these updates are fine.

I think this can be closed.