Which version of laravel?

|
AngelGoitia 2020-05-12 22:44:33
Siberfx 2020-05-12 22:43:31
which version of laravel ?

7.0

Siberfx 2020-05-12 22:45:55
so your migration file is your problem
AngelGoitia 2020-05-12 22:46:01
Siberfx 2020-05-12 22:44:07
show code of add_user_role_relationship migration file

laravel_discuss-37050.jpg

AngelGoitia 2020-05-12 22:46:47
Siberfx 2020-05-12 22:45:55
so your migration file is your problem

that’s the voyage package migration

Siberfx 2020-05-12 22:47:21
yes but check, the migraiton file generated at 2017,
Siberfx 2020-05-12 22:47:34
there was no even laravel 6 in these days.
Siberfx 2020-05-12 22:49:25
AngelGoitia 2020-05-12 22:46:01

$table->foreign(‘foreign_key_name’)
->references(‘id’)->on(‘roles’)
->onDelete(‘no action’)
->onUpdate(‘no action’);

imsus_k 2020-05-12 22:49:26
AngelGoitia 2020-05-12 22:46:01

Roles table screenshot

Siberfx 2020-05-12 22:49:30
this is an example.
Siberfx 2020-05-12 22:50:41
AngelGoitia 2020-05-12 22:42:23

also show the list of all migrated ones in this image please.

Siberfx 2020-05-12 22:50:59
the order of migrated files also important
imsus_k 2020-05-12 22:51:18
But i want roles migration
imsus_k 2020-05-12 22:51:28
From where i can analyze
imsus_k 2020-05-12 22:51:41
Because both related users and role
AngelGoitia 2020-05-12 22:53:27
imsus_k 2020-05-12 22:49:26
Roles table screenshot

laravel_discuss-37062.jpg

AngelGoitia 2020-05-12 22:54:07
Siberfx 2020-05-12 22:50:59
the order of migrated files also important

laravel_discuss-37063.jpg

imsus_k 2020-05-12 22:54:12
AngelGoitia 2020-05-12 22:46:01

Remove big from here

imsus_k 2020-05-12 22:54:19
Or
imsus_k 2020-05-12 22:54:29
AngelGoitia 2020-05-12 22:53:27

Add bigincrement here

imsus_k 2020-05-12 22:54:38
Defenitely resolve
Siberfx 2020-05-12 22:54:43
also you should know one more thing
imsus_k 2020-05-12 22:54:59
Because two different datatype creTe issue
Siberfx 2020-05-12 22:55:03
usage of the usigned() in mgiration files also depends
Siberfx 2020-05-12 22:55:29
$table->unsignedBigInteger(‘name’)
imsus_k 2020-05-12 22:55:46
Siberfx 2020-05-12 22:55:29
$table->unsignedBigInteger(‘name’)

Yeah sure not name id

Siberfx 2020-05-12 22:55:51
this kind of fields not giving problems laravel 6+ versions
imsus_k 2020-05-12 22:56:25
First try and let me know I am sure problem will resolve
Siberfx 2020-05-12 22:56:36
Sushant, I try to give him examples, but complaining my advises, so give better ideas if you have or shut up. 🙂
AngelGoitia 2020-05-12 22:56:40
imsus_k 2020-05-12 22:54:12
Remove big from here

laravel_discuss-37076.jpg

AngelGoitia 2020-05-12 22:56:53
AngelGoitia 2020-05-12 22:56:40

ready now I get an error in this migration voyage

AngelGoitia 2020-05-12 22:57:42
laravel_discuss-37078.jpg

imsus_k 2020-05-12 22:58:08
AngelGoitia 2020-05-12 22:57:42

Migration revert karo

imsus_k 2020-05-12 22:58:10
Pahle
FonteneleBR 2020-05-12 22:58:11
you have to drop this table manualy
imsus_k 2020-05-12 22:58:19
Ya manually migration delete karo
FonteneleBR 2020-05-12 22:58:32
because you had a problem in migration, table was created but not inserted at migrations table
FonteneleBR 2020-05-12 22:58:38
if migrate:rollback not resolve
imsus_k 2020-05-12 22:58:58
Siberfx 2020-05-12 22:56:36
Sushant, I try to give him examples, but complaining my advises, so give better ideas if you have or shut up. 🙂

Okey sir you have more knowlege than me what i can i am telling i am not always right sir

Siberfx 2020-05-12 23:01:08
in all the way its a fresh installation as I think, so instead trying to rollback each time after a change in migration files,
php artisan migrate:fresh
Siberfx 2020-05-12 23:01:32
rollback will not handle that
imsus_k 2020-05-12 23:01:55
Yeah right
Siberfx 2020-05-12 23:03:04
if I were you, I would make passive all the foreign key parts of the migrations, and after all works with no any errors, I would have create additional migration file which contains all these relationships
AngelGoitia 2020-05-12 23:03:34
Siberfx 2020-05-12 23:03:04
if I were you, I would make passive all the foreign key parts of the migrations, and after all works with no any errors, I would have create additional migration file which contains all these relationships

I get a second migration error

Siberfx 2020-05-12 23:03:40
show ?
AngelGoitia 2020-05-12 23:03:46
laravel_discuss-37092.jpg

Siberfx 2020-05-12 23:03:58
php artisan migrate:fresh
AngelGoitia 2020-05-12 23:04:38
Siberfx 2020-05-12 23:03:58
php artisan migrate:fresh

I put it on and I got that error

Siberfx 2020-05-12 23:04:57
if you dont mind, let me check it myself
Siberfx 2020-05-12 23:05:03
do you have AnyDesk ? pm me
FonteneleBR 2020-05-12 23:05:11
drop user_roles table manualy
|