Tim Bunce wrote:

It's 2004 and we can't even write VARCHAR(1024). How sad is that?


How about using Perl in the script that executes the SQL?

   $sql_create =~ s/VARCHAR(1024)/TEXT/gi if $dsn =~ /dbi:(mysql/i;
   $sql_create =~ s/VARCHAR(1024)/BLOB/gi if $dsn ...

Oh, and BTW, the ALTER TABLE statements won't work with DBD::SQLite - it doesn't support ALTER TABLE at all and FOREIGN KEY constraints only partially (it parses the constraints but doesn't enforce them). I'm just having the script ignore complaints about ALTER TABLE. If we use examples that depend on the constraints, we'll just have to have a caveat for SQLite.

--
Jeff



Reply via email to