You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assume your database contains a table with a definition like so:
CREATE TABLE `test` (
`some_col` int NOT NULL COMMENT '(DC2Type:some_type)'
)
In your application, you may have configured Doctrine with some special (custom) mapping type, thus the comment (DC2Type:some_type).
When trying to dump this database, slimdump fails with an exception when trying to load the schema information, since the some_type type is not known to DBAL.
It should not be necessary to configure this type either; in fact, we (probably) don't care about types that much, we just need to decide whether or not we're dealing with BLOB values.
Probably we need to come up with a clever way of how/when to register placeholder types dynamically?
The text was updated successfully, but these errors were encountered:
janopae
changed the title
Unable to deal with custom Doctrine types
Unable to deal with custom Doctrine types (Case 167398)
Jan 16, 2024
We're using the `SchemaManager` to simplify listing tables, views and so
on. But, the information provided by it also includes the DBAL types
used for columns, and that information may be parsed from column
comments in the database.
The problem is that a table definition like so:
```sql
CREATE TABLE `test` (
`some_col` int NOT NULL COMMENT '(DC2Type:some_type)'
)
```
... `slimdump` fail fail with an exception because it does not know
about the `some_type`. This type may be available and defined in your
application, but we cannot put it into the `slimdump` command.
Now, in fact, we don't care about the type and its conversion
capabilities at all. So, this PR adds a runtime "just in type"
registration of a `DummyType` that serves as a placeholder to avoid
issues when loading the schema.
Fixes#96.
Assume your database contains a table with a definition like so:
In your application, you may have configured Doctrine with some special (custom) mapping type, thus the comment
(DC2Type:some_type)
.When trying to dump this database,
slimdump
fails with an exception when trying to load the schema information, since thesome_type
type is not known to DBAL.It should not be necessary to configure this type either; in fact, we (probably) don't care about types that much, we just need to decide whether or not we're dealing with BLOB values.
Probably we need to come up with a clever way of how/when to register placeholder types dynamically?
The text was updated successfully, but these errors were encountered: