exolnet / laravel-sqlite-fluent-drop-foreign
在sqlite数据库使用时添加fluent dropForeign
v1.8.0
2024-03-28 14:22 UTC
Requires
- php: ^8.1
- illuminate/database: ^10.0|^11.0
- illuminate/support: ^10.0|^11.0
Requires (Dev)
- exolnet/phpcs-config: ^1.0
- orchestra/testbench: ^8.0|^9.0
- phpunit/phpunit: ^10.5
- squizlabs/php_codesniffer: ^3.6
README
当使用SQLite数据库时,使dropForeign操作变得流畅。
安装
使用composer要求此包
composer require exolnet/laravel-sqlite-fluent-drop-foreign
如果你不使用包自动发现,请将服务提供者添加到config/app.php
中的providers
数组中
Exolnet\SQLiteFluentDropForeign\SQLiteFluentDropForeignServiceProvider::class
用法
安装此包后,所有对sqlite
连接的dropForeign
的调用都将返回一个new Fluent()
,以避免出现SQLite不支持删除外键(你需要重新创建表)
错误。
测试
要运行phpUnit测试,请使用
composer test
贡献
请参阅CONTRIBUTING和行为准则以获取详细信息。
安全性
如果你发现任何安全相关的问题,请通过电子邮件security@exolnet.com联系,而不是使用问题跟踪器。