I don't think it's smart to let DAL migrate your tables in production. 
 Much better to write your own scripts to handle it.  

Then of course you should test those scripts before you get to the 
production instance.  

The simplest and easiest place to create and test the scripts is on your 
development machine.  That means your development machine should be running 
the same DBMS as your production box.

Using the same DBMS on your production and development boxes is the right 
way to do things IMO, because it will help you avoid the kinds of surprises 
that triggered this thread in the first place.

At some point you have to get to know your DBMS.

On Wednesday, April 3, 2013 2:40:16 PM UTC-4, Chris wrote:
>
> It would probably be difficult to keep DAL up to date with DBMS releases 
> -- would hate to have to rev some part of web2py every time even one of the 
> supported DBMSs has a version change.  And even then, version alone may not 
> answer the question, since max field lengths can be affected by database 
> configuration options as well.
>
> A better solution would be for DAL to probe the actual DBMS capabilities 
> -- if there is a question about an issue like a max string length, allow 
> DAL to control one table (dbms_capabilities?) that can be used to test 
> actual limits.  E.g. if a DB model file specifies a string field of length 
> 8000 and that is above the previously-tested limit, drop and create 
> dbms_capabilities with a string(8000) field, write 8000 characters to it, 
> read it back, and see if the result matches the input.  This would be a 
> very thorough way to find the limits of any database exactly as configured.
>
> Not sure if this would be needed for other data types too (decimal 
> precision or ??) but could be generalized.
>
> The original problem of silently accepting a database definition that the 
> DBMS can't produce is really concerning.
>
>
>
>
> On Friday, September 14, 2012 9:39:14 AM UTC-4, Chris wrote:
>>
>> ... whatever the max length is for the particular DBMS / version, if the 
>> Field() call specifies a length longer than the max, return the same error 
>> as for other invalid field lengths (like -1).
>>
>>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to