migrations-generator icon indicating copy to clipboard operation
migrations-generator copied to clipboard

Laravel 6.0 Compatibility

Open nasatome opened this issue 5 years ago • 27 comments

Laravel 6.0 Compatibility ?

composer require --dev "xethron/migrations-generator"

Using version ^2.0 for xethron/migrations-generator
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - xethron/migrations-generator v2.0.0 requires way/generators dev-feature/laravel-five-stable -> no matching package found.
    - Conclusion: remove laravel/framework v6.0.0
    - Conclusion: don't install laravel/framework v6.0.0
    - xethron/migrations-generator v2.0.1 requires xethron/laravel-4-generators ~3.1.0 -> satisfiable by xethron/laravel-4-generators[3.1.0, 3.1.1].
    - xethron/migrations-generator v2.0.2 requires xethron/laravel-4-generators ~3.1.0 -> satisfiable by xethron/laravel-4-generators[3.1.0, 3.1.1].

nasatome avatar Sep 05 '19 20:09 nasatome

Perhaps https://github.com/laracasts/Laravel-5-Generators-Extended will be a good alternative.

jasperf avatar Sep 11 '19 03:09 jasperf

will be waiting for update. thanks for this

blindiceyes avatar Sep 11 '19 05:09 blindiceyes

have the same problem today, I just have installed laravel in supported version and now it is working. composer create-project laravel/laravel="5.6.*" Project_Name

jdamps avatar Sep 11 '19 21:09 jdamps

Perhaps https://github.com/laracasts/Laravel-5-Generators-Extended will be a good alternative.

This is not an alternative

MammutAlex avatar Sep 12 '19 16:09 MammutAlex

Did some more research yesterday @MammutAlex . Though Laravel 5 Generators Extended is not a true replacement it does make migrations much easier as you can add columns and column types to commands to generate your migrations that much faster. There is a Laracasts Video on it too, but cannot locate it now.

However if you need to convert a database to migrations I did find a Sequel Pro extension. Perhaps there is one for MySQL Workbench too.

jasperf avatar Sep 12 '19 23:09 jasperf

@jasperf +1 to the Sequel Pro extension. I just used it on 400 + tables and it worked well.

jase-languasco avatar Sep 24 '19 16:09 jase-languasco

@jase-languasco Good to hear it worked well for you too man.

jasperf avatar Sep 24 '19 23:09 jasperf

@bernhard: You´ve done a realy good job! Will you make it compatible for laravel 6? or is there a way to install it anyway? For me it is no option to install laravel in Required Version. I Need Laravel6. ;) I think the problem is that your code depends on jeffry´s old laravel-4-generator not the https://github.com/laracasts/Laravel-5-Generators-Extended thnx

Bagadulittle avatar Oct 04 '19 13:10 Bagadulittle

@Bagadulittle Yes, that seems to be the problem. Will require some work to get it working with 6 I think.

For now, the best workaround is to install a fresh copy of Laravel 5.*, generate the migrations, and copy them across.

Xethron avatar Oct 11 '19 12:10 Xethron

@Xethron: thanks that´s what i do at the moment. And that´s a little laborious, But i allways think abougth to r3write the hole thing. If i do this i get you in touch. thanX for your reply.

Bagadulittle avatar Oct 16 '19 05:10 Bagadulittle

please add support laravel 6

vahidalvandi avatar Nov 07 '19 16:11 vahidalvandi

pleaseee @vahidalvandi

leonelhrp avatar Nov 12 '19 19:11 leonelhrp

i found new solution with EER model and mysql workbench 8 https://www.aparat.com/v/boFdX

vahidalvandi avatar Nov 13 '19 06:11 vahidalvandi

It does slightly work with new version of of WB 8 but just lets you preview where you can copy/paste a large amount of data and split it

johncarlson21 avatar Nov 22 '19 19:11 johncarlson21

Use https://github.com/oscarafdev/migrations-generator

oscarafdev avatar Dec 01 '19 16:12 oscarafdev

Use https://github.com/oscarafdev/migrations-generator in 6*2 still has error

danangs57 avatar Dec 02 '19 06:12 danangs57

Use https://github.com/oscarafdev/migrations-generator in 6*2 still has error

If you get the camel_case error just change the lines to this

           $converted = Str::camel($this->migrationName);

	return [
		'CLASS' => ucwords($converted),
		'UP'    => $up,
		'DOWN'  => $down
	];

trentramseyer avatar Dec 06 '19 07:12 trentramseyer

Use https://github.com/oscarafdev/migrations-generator in 6*2 still has error

Fixed, ty

oscarafdev avatar Dec 10 '19 19:12 oscarafdev

Use https://github.com/oscarafdev/migrations-generator in 6*2 still has error

Fixed, ty

image

hose1021 avatar Dec 12 '19 12:12 hose1021

camel_case error not fixed, how to fix?

edit: fixed but composer dont download the most recent fix, edit to this.

return [ 'CLASS' => ucwords(\Str::camel($this->migrationName)), 'UP' => $up, 'DOWN' => $down ];

Mr-Fadul avatar Dec 12 '19 17:12 Mr-Fadul

camel_case error not fixed, how to fix?

edit: fixed but composer dont download the most recent fix, edit to this.

return [ 'CLASS' => ucwords(\Str::camel($this->migrationName)), 'UP' => $up, 'DOWN' => $down ];

Sorry, I forgot to create a new release

oscarafdev avatar Dec 12 '19 19:12 oscarafdev

'CLASS' => ucwords(\Str::camel($this->migrationName)),

Please change '\Str' to 'Str' if you have used the 'use Illuminate\Support\Str;' on top. I got an error

EVNIKHIL avatar Feb 17 '20 11:02 EVNIKHIL

Use https://github.com/oscarafdev/migrations-generator

I get this error upon executing "composer require oscarafdev/migrations-generator 2.0.16" Your requirements could not be resolved to an installable set of packages.

Sorry still a newbie in laravel :(

eranamarante avatar Mar 13 '20 02:03 eranamarante

I have updated the package with more data type supports such as json, set, spatial type like geometry, point, and fixed some issues.

It also support Laravel from 5.6 to 7.0

Please try https://github.com/kitloong/laravel-migrations-generator and comment

kitloong avatar Apr 03 '20 10:04 kitloong

I have updated the package with more data type supports such as json, set, spatial type like geometry, point, and fixed some issues.

It also support Laravel from 5.6 to 7.0

Please try https://github.com/kitloong/laravel-migrations-generator and comment

It works on Laravel 7.4.0 & php 7.4.3

vladislavtkachenko avatar Apr 05 '20 19:04 vladislavtkachenko

@kitloong is it possible to force the migrations to be regenerated, when I run it twice I get two sets of migrations.

Thanks by the way for making this Laravel 6 and 7 compatible

ssmusoke avatar May 08 '20 10:05 ssmusoke

@ssmusoke Thank you. Currently there is no way to merge new generated migrations with existing. You need to delete the old set before generate new migrations.

kitloong avatar May 14 '20 09:05 kitloong