Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.06+ and size info for integers and various other columns [rt.cpan.org #59640] #47

Open
rabbiveesh opened this issue Nov 20, 2022 · 0 comments

Comments

@rabbiveesh
Copy link
Contributor

Migrated from rt.cpan.org#59640 (status was 'open')

Requestors:

From maz@mlx.net on 2010-07-23 06:38:09
:

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

From rkitover@cpan.org on 2010-07-27 21:36:50
:

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
> 
> 

From rkitover@cpan.org on 2011-01-21 04:19:13
:

Hi,

is this still an issue for you? The lack of size in bytes for integers
etc. in the generated Result classes.

I see you are asking for some sort of configuration option, so I'm not
closing the ticket yet.

What would this option do? Just set size to size in bytes rather than
DDL size?

From maz@mlx.net on 2011-01-21 05:42:59
:

Actually, it's not an issue for me anymore because I have switched to 
generating my schema files from the database to generating the database 
from the schema files.  Though I don't know if it may be an issue for 
others.


On 1/21/2011 12:19 PM, Rafael Kitover via RT wrote:
> <URL: https://rt.cpan.org/Ticket/Display.html?id=59640>
>
> Hi,
>
> is this still an issue for you? The lack of size in bytes for integers
> etc. in the generated Result classes.
>
> I see you are asking for some sort of configuration option, so I'm not
> closing the ticket yet.
>
> What would this option do? Just set size to size in bytes rather than
> DDL size?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant