No subject


Sun Nov 20 20:48:46 GMT 2022


```
Hi John,

The "size" means the size of the type when declared in DDL, for example
for VARCHAR(30) the "size" is 30.

INTEGER and such do not have a size for DDL purposes, this is why it is
omitted.

Previous versions of ::Schema::Loader just set size to the size in bytes
are reported by DBI, this was wrong and broke deploying the generated
schemas with $schema->deploy using SQL::Translator.

Current versions of ::Schema::Loader are much more SQL::Translator
friendly and have accurate type information for the purposes of
deployment and cross-deployment.

If you need the old behavior, make a subclass of
::Schema::Loader::DBI::mysql that overrides _columns_info_for and pass
that in as the "loader_class".

On Fri, Jul 23, 2010 at 02:38:10AM -0400, John Maslanik via RT wrote:
> Versions of DBIx::Class::Schema::Loader prior to Version 0.06 always 
> included the "size" definition for mysql databases.  Version 0.06+ no 
> longer includes "size" definitions for some fields such as integers.  
> This breaks any script that depends on the "size" definition.  Could we 
> either put the size definition back in or make it a configurable 
> option?  This breaks all my validation routines which depend on the 
> "size" definition.
> 
> 
> Sincerely,
> 
> John Maslanik
> 
> 
```



More information about the DBIx-Class-Devel mailing list