[freeside] Creating db problem
Brad Dameron
bdameron at tscnet.com
Tue Oct 23 12:00:39 PDT 2001
This is exactly the case. It also states that you can not have a char and a
varchar in the same table. It will make the char a varchar. But I have yet
to see this happen.
---
Brad Dameron Network Account Executive
TSCNet Inc. www.tscnet.com
Silverdale, WA. 1-888-8TSCNET
-----Original Message-----
From: ivan [mailto:ivan at 420.am]
Sent: Tuesday, October 23, 2001 10:47 AM
To: ivan-freeside at sisd.com
Subject: Re: [freeside] Creating db problem
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