Feature to not append database prefix in QueryBuilder |
@michalsn Thank you for the tip on using forge to drop a foreign key, but it's missing the point. The point is that builder doesn't have means of turning off the appending of the prefix but sometimes it's needed. For example, if I extracted the builder code into a function foreignKeyExists(string $constraintName, string $tableName, string $databaseName): bool then the foreach becomes
PHP Code: foreach ($foreignKeys as $fk) { Now my foreignKeyExists() function has the same problem and it has nothing to do with forge. PHP Code: fuction foreignKeyExists(string $constraintName, string $tableName, string $databaseName): bool { Adding the ability in table() to not append the prefix saves code and is useful when you don't want to append table names. |
Messages In This Thread |
Feature to not append database prefix in QueryBuilder - by objecttothis - 05-02-2025, 02:37 AM
RE: Feature to not append database prefix in QueryBuilder - by michalsn - 05-02-2025, 03:43 AM
RE: Feature to not append database prefix in QueryBuilder - by objecttothis - 05-02-2025, 03:59 AM
RE: Feature to not append database prefix in QueryBuilder - by michalsn - 05-02-2025, 04:24 AM
RE: Feature to not append database prefix in QueryBuilder - by objecttothis - 05-02-2025, 05:41 AM
RE: Feature to not append database prefix in QueryBuilder - by michalsn - 05-03-2025, 01:21 PM
|