Replies: 3 comments
-
Without laravel version, package version, php version, db version, I don't think anyone can help you |
Beta Was this translation helpful? Give feedback.
0 replies
-
Sorry, my mistake.
I use a Oracle-Database |
Beta Was this translation helpful? Give feedback.
0 replies
-
Change names for primary and foreign keys Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames, $teams) {
$table->unsignedBigInteger(PermissionRegistrar::$pivotPermission);
$table->string('model_type');
$table->unsignedBigInteger($columnNames['model_morph_key']);
$table->index([$columnNames['model_morph_key'], 'model_type'], 'mhp_mid_mtype_index');
$table->foreign(PermissionRegistrar::$pivotPermission, 'mhp_permission')
->references('id') // permission id
->on($tableNames['permissions'])
->onDelete('cascade');
if ($teams) {
$table->unsignedBigInteger($columnNames['team_foreign_key']);
$table->index($columnNames['team_foreign_key'], 'mhp_tid_index');
$table->primary([$columnNames['team_foreign_key'], PermissionRegistrar::$pivotPermission, $columnNames['model_morph_key'], 'model_type'],
'mhp_permission_mtype_key');
} else {
$table->primary([PermissionRegistrar::$pivotPermission, $columnNames['model_morph_key'], 'model_type'],
'mhp_permiss_mtype_key');
}
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I tried to generate the database on the server via php artisan migrate.
Everything worked except for the permission_table.
I get the following error message here (see attachment).
Can you maybe help me?
Beta Was this translation helpful? Give feedback.
All reactions