On Feb 21, 2007, at 10:00, John Siracusa wrote:

> I'm going to release 0.761 shortly.  If you have any outstanding bugs
> not fixed in SVN or any other small suggestions, speak now...

Maybe this is something, once again, that I am doing wrong - but I  
don't understand this:

mysql 5.0.27 and DBD::mysql 3.0008:

create table bars (id int unsigned not null primary key, foo varchar 
(255) not null) engine = InnoDB;

gets me (with the auto loader):

__PACKAGE__->meta->setup(
   table   => 'bars',

   columns => [
     id  => { type => 'integer', not_null => 1 },
     foo => { type => 'varchar', default => '', length => 255,  
not_null => 1 },
   ],

   primary_key_columns => [ 'id' ],
);

Note the "" default to "foo".

MySQL, correctly, says the default is NULL:

mysql> show create table bars\G
*************************** 1. row ***************************
        Table: bars
Create Table: CREATE TABLE `bars` (
   `id` int(10) unsigned NOT NULL,
   `foo` varchar(255) NOT NULL,
   PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

mysql> select * from information_schema.columns where table_schema =  
'ntppool' and table_name = 'bars' and column_name = 'foo'  \G
*************************** 1. row ***************************
            TABLE_CATALOG: NULL
             TABLE_SCHEMA: ntppool
               TABLE_NAME: bars
              COLUMN_NAME: foo
         ORDINAL_POSITION: 2
           COLUMN_DEFAULT: NULL
              IS_NULLABLE: NO
                DATA_TYPE: varchar
CHARACTER_MAXIMUM_LENGTH: 255
   CHARACTER_OCTET_LENGTH: 255
        NUMERIC_PRECISION: NULL
            NUMERIC_SCALE: NULL
       CHARACTER_SET_NAME: latin1
           COLLATION_NAME: latin1_swedish_ci
              COLUMN_TYPE: varchar(255)
               COLUMN_KEY:
                    EXTRA:
               PRIVILEGES: select,insert,update,references
           COLUMN_COMMENT:
1 row in set (0.03 sec)


  - ask

-- 
http://develooper.com/ - http://askask.com/



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to