Skip to content

v1.8.3: prefixed connections no longer render empty tables

Latest

Choose a tag to compare

@albertoarena albertoarena released this 12 Aug 14:13
· 2 commits to main since this release

Fixed

  • On a connection configured with a table prefix ('prefix' => 'portal_', or DB_PREFIX), every table rendered as an empty block: no columns, no types, no keys, and no relationship lines. Laravel reports table names exactly as the database stores them, prefix included, but prepends the prefix again to any name passed into its column, index and foreign key methods, so introspection was asking for portal_portal_users and getting an empty result back with no error to explain it. The prefix is now suspended for the duration of a snapshot, and introspection works in real database names throughout. Suspending it rather than trimming each name also covers a schema shared between apps, where the prefix separates the two and the other app's tables never carried it. The same fault silently dropped every native column comment from truss:export annotations on a prefixed connection, and is fixed with it. Reported by @locshino.
  • Export annotations could pick up table and column comments from a database the app has nothing to do with. Reading them used an unscoped table listing, which on Laravel 12 and later covers every schema on the server, so on a shared host another database's comments entered the map, and a table sharing a name with one of yours could annotate it with that other application's meaning. The listing is now scoped to the connection's own schema, matching what the diagram has always done. Structure only as ever: comments are part of the table definition, never row data.