laravel-oci8 icon indicating copy to clipboard operation
laravel-oci8 copied to clipboard

Disabling foreign key constraints

Open ttomdewit opened this issue 5 years ago • 3 comments

Summary of problem or feature request

When disabling foreign key constraints via the Schema manager, the code fails with an Oracle DB. In the same setup the MySQL version works accordingly.

I was unable to find anything related to truncating other than the index names (which are limited to 30 characters, if I remember correctly) and ticket #151. But here you need to specifcally mention the available foreign keys, something that's not required "the MySQL way".

Code snippet of problem

Schema::disableForeignKeyConstraints();
User::truncate();
Schema::enableForeignKeyConstraints();
BadMethodCallException: Method Yajra\Oci8\Schema\Grammars\OracleGrammar::compileDisableForeignKeyConstraints does not exist.

This might be applicable.

System details

  • Operating System (via Docker):
Distributor ID: Debian
Description:    Debian GNU/Linux 9.7 (stretch)
Release:        9.7
Codename:       stretch
  • PHP Version: PHP 7.2.15 (cli) (built: Feb 9 2019 02:46:46) ( NTS )
  • Laravel Version: Laravel Framework 5.7.27
  • Laravel-OCI8 Version: ^5.7

Thank you for your time, I'm very much looking forward to your reply.

ttomdewit avatar Feb 21 '19 08:02 ttomdewit

It seems like compileDisableForeignKeyConstraints is not yet available on the package. Will try to implement this when I got the chance. If you can please do not hesitate to submit a PR. Thanks!

yajra avatar Mar 12 '19 03:03 yajra

Hello has there been any development on this issue?

Saif-XI-Coderz avatar Jan 06 '22 07:01 Saif-XI-Coderz

Hello has there been any development on this issue?

not from my side. I don’t work with Laravel anymore and have since moved to a new employer.

ttomdewit avatar Jan 11 '22 20:01 ttomdewit