[freeside] Creating db problem

ivan ivan at 420.am
Tue Oct 23 10:47:05 PDT 2001


On Tue, Oct 23, 2001 at 12:01:02PM -0500, Edward Shabotinsky wrote:
> Thanks Ivan
> now i have no problem with DBIx::DBSchema module, i guess freebsd little
> diff than a linux :-)

Hehe, it's a MySQL/PostgreSQL compatibility problem, not a FreeBSD/Linux
one.  :)  Looks like MySQL doesn't like `varchar' columns that don't have
a length specified, and it chops them off at 255 characters.

Drop all the tables, apply the following patch to fs-setup, and run
fs-setup again.  Please let me know if this works for you.

-- 
_ivan


Index: fs-setup
===================================================================
RCS file: /home/cvs/cvsroot/freeside/bin/fs-setup,v
retrieving revision 1.63
diff -u -r1.63 fs-setup
--- fs-setup    2001/10/20 12:17:59     1.63
+++ fs-setup    2001/10/23 17:42:31
@@ -73,7 +73,7 @@
 
 #my(@date_type)  = ( 'timestamp', '', ''     );
 my(@date_type)  = ( 'int', 'NULL', ''     );
-my(@perl_type) = ( 'varchar', 'NULL', ''  ); 
+my(@perl_type) = ( 'text', 'NULL', ''  ); 
 my @money_type = ( 'decimal',   '', '10,2' );
 
 ###
@@ -316,7 +316,7 @@
         '_date',    @date_type,
         'amount',   @money_type,
         'otaker',   'varchar', '', 8,
-        'reason',   'varchar', 'NULL', 255,
+        'reason',   'text', 'NULL', '',
       ],
       'primary_key' => 'crednum',
       'unique' => [ [] ],
@@ -379,7 +379,7 @@
         'otaker',   'varchar', '',     8,
         'refnum',   'int',  '',     '',
         'referral_custnum', 'int',  'NULL', '',
-        'comments', 'varchar', 'NULL', '',
+        'comments', 'text', 'NULL', '',
       ],
       'primary_key' => 'custnum',
       'unique' => [ [] ],
@@ -542,8 +542,8 @@
         'recur',      @perl_type,
         'setuptax',  'char', 'NULL', 1,
         'recurtax',  'char', 'NULL', 1,
-        'plan',       'varchar', 'NULL', '',
-        'plandata',   'varchar', 'NULL', '',
+        'plan',       'varchar', 'NULL', $char_d,
+        'plandata',   'text', 'NULL', '',
       ],
       'primary_key' => 'pkgpart',
       'unique' => [ [] ],
@@ -791,7 +791,7 @@
     'queue' => {
       'columns' => [
         'jobnum', 'int', '', '',
-        'job', 'varchar', '', '',
+        'job', 'text', '', '',
         '_date', 'int', '', '',
         'status', 'varchar', '', $char_d,
       ],
@@ -804,7 +804,7 @@
       'columns' => [
         'argnum', 'int', '', '',
         'jobnum', 'int', '', '',
-        'arg', 'varchar', 'NULL', '',
+        'arg', 'text', 'NULL', '',
       ],
       'primary_key' => 'argnum',
       'unique'      => [],




More information about the freeside-users mailing list