[geeklog-devel] MS SQL Upgrade

Michael Jervis mjervis at gmail.com
Fri May 23 15:37:23 EDT 2008


Ah yes, I was a little confused running through it today.

I believe that with this thread as a reference and the SQL I've tuned
with a working MS SQL environment so far I can now fix it up properly
tomorrow, provided the kids give me the peace to do so.

I have media and probably the right to use a licence for SQL 2000
Developer edition on an environment so I will /try/ and establish that
and finish it off over the weekend as I get time.

Cheers,

Mike

On Fri, May 23, 2008 at 7:38 PM, Randy Kolenko <Randy.Kolenko at nextide.ca> wrote:
>>
>> In the MySQL db schema, the primary key is
>>
>>   PRIMARY KEY (qid, pid)
>>
>> whereas in the MS SQL schema, only qid is the primary key.
>> That looks like the problem to me.
>>
>
>
> True -- its one of the problems.  The other is that the qid column needs
> a default value of '0' as shown here in the mysql install sql:
>
> $_SQL[] = "
> CREATE TABLE {$_TABLES['pollquestions']} (
>  qid mediumint(9) NOT NULL DEFAULT '0',
>  pid varchar(20) NOT NULL,
>  question varchar(255) NOT NULL,
>  PRIMARY KEY (qid, pid)
> ) TYPE=MyISAM
> ";
>
>
> Which now means that we have to alter the mssql version to look like
> this:
>
>
>
> CREATE TABLE [dbo].[gl_pollquestions] (
>        [qid] [int] NOT NULL ,
>        [pid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
> NULL ,
>        [question] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS
> NULL
> ) ON [PRIMARY]
> GO
>
> ALTER TABLE [dbo].[gl_pollquestions] ADD
>        CONSTRAINT [DF_gl_pollquestions_qid] DEFAULT (0) FOR [qid],
>        CONSTRAINT [PK_gl_pollquestions] PRIMARY KEY  CLUSTERED
>        (
>                [qid],
>                [pid]
>        )  ON [PRIMARY]
> GO
>
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://eight.pairlist.net/mailman/listinfo/geeklog-devel
>



-- 
Michael Jervis
mjervis at gmail.com
504B03041400000008008F846431E3543A820800000006000000060000007765
62676F642B4F4D4ACF4F0100504B010214001400000008008F846431E3543A82
0800000006000000060000000000000000002000000000000000776562676F64
504B05060000000001000100340000002C0000000000



More information about the geeklog-devel mailing list