[Rt-devel] schema thought

Jesse Vincent jesse at bestpractical.com
Tue Jul 10 12:52:28 EDT 2007


On Jul 10, 2007, at 9:48 AM, Nicholas Clark wrote:

> On Tue, Jul 10, 2007 at 09:46:03AM -0700, Jesse Vincent wrote:
>>
>> On Jul 10, 2007, at 9:41 AM, Nicholas Clark wrote:
>>
>>> Is there any reason not to
>>>
>>>  alter table Groups change Instance Instance int unsigned not null;
>>>
>>> currently Instance is always a number (either some sort of Id, or
>>> 1), yet
>>> it's stored in a varchar(64)
>>>
>>
>> (I removed SQL comments from the grep below)
>>
>>
>> pinglin:~/svk/rt-3.6/etc jesse$ grep Instance schema.* |grep -v INDEX
>> schema.Informix:        Instance        INTEGER DEFAULT 0 NOT NULL,
>> schema.Oracle:  Instance        NUMBER(11,0) DEFAULT 0 -- NOT NULL
>> schema.Pg:  Instance integer,
>> schema.SQLite:  Instance integer
>> schema.Sybase:  Instance integer,
>> schema.mysql:  Instance integer,
>
> Aha - so this is legacy from an installation that was upgraded from  
> 3.4?
>

pinglin:~/svk/rt-3.4/etc jesse$ grep Instance schema.* |grep -v INDEX  
|grep -v ':--'
schema.Informix:        Instance        INTEGER DEFAULT 0 NOT NULL,
schema.Oracle:  Instance        NUMBER(11,0) DEFAULT 0 -- NOT NULL
schema.Pg:  Instance integer,
schema.SQLite:  Instance integer
schema.Sybase:  Instance integer,
schema.mysql:  Instance integer,
pinglin:~/svk/rt-3.4/etc jesse$ cd ../rt-3.2
-bash: cd: ../rt-3.2: No such file or directory
pinglin:~/svk/rt-3.4/etc jesse$ cd ../../rt-3.2/etc/
pinglin:~/svk/rt-3.2/etc jesse$ grep Instance schema.* |grep -v INDEX  
|grep -v ':--'
schema.Informix:        Instance        INTEGER DEFAULT 0 NOT NULL,
schema.Oracle:  Instance        NUMBER(11,0) DEFAULT 0 -- NOT NULL
schema.Pg:  Instance integer,
schema.SQLite:  Instance integer
schema.Sybase:  Instance integer,
schema.mysql:  Instance integer,

I don't have a 3.0 checkout.

But yes, it's safe to fix

> Nicholas Clark
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.bestpractical.com/pipermail/rt-devel/attachments/20070710/cb2618ac/PGP.pgp


More information about the Rt-devel mailing list