[Using Sakai] Sakai upgrade to 2.9.x mysql question

Anders Nordkvist anders.nordqvist at his.se
Tue May 7 00:33:37 PDT 2013


Hi Steve and other Sakai friendly people,

I suppose it should be some kind of DEFAULT set for the FUNCTION_KEY column? Or else you can’t use the DEFAULT value when you insert (And its set to AUTO_INCREMENT)?
Can I find information about the Sakai database somewhere?

PS. I think I should wait until I file a report because I don’t know how its working yet.

SAKAI_REALM_FUNCTION | CREATE TABLE `SAKAI_REALM_FUNCTION` (
  `FUNCTION_KEY` int(11) NOT NULL AUTO_INCREMENT,
  `FUNCTION_NAME` varchar(99) NOT NULL,
  PRIMARY KEY (`FUNCTION_KEY`),
  UNIQUE KEY `IE_SAKAI_REALM_FUNCTION_NAME` (`FUNCTION_NAME`),
  KEY `SAKAI_REALM_FUNCTION_KN` (`FUNCTION_KEY`,`FUNCTION_NAME`)
) ENGINE=InnoDB AUTO_INCREMENT=200 DEFAULT CHARSET=utf8 |

I

From: Steve Swinsburg [mailto:steve.swinsburg at gmail.com]
Sent: den 7 maj 2013 00:32
To: Anders Nordkvist
Cc: sakai-user at collab.sakaiproject.org
Subject: Re: [Using Sakai] Sakai upgrade to 2.9.x mysql question

It's probably too late to go back and fix this in the tag but can you file a Jira so it can be tracked?

Thanks.

Sent from my iPhone

On 07/05/2013, at 0:02, Anders Nordkvist <anders.nordqvist at his.se<mailto:anders.nordqvist at his.se>> wrote:
Thanks for answering,

Its the 2.9.0 conversion script and I have already run the 2.7.1 – 2.8.0 script. We are running sitestats  version 2.1.11. Isnt it strange that the script is trying to insert a value like “default” in a table with a column with type INT? The values for the two rows are:

mysql> select FUNCTION_KEY from SAKAI_REALM_FUNCTION where FUNCTION_NAME='sitestats.view';
+--------------+
| FUNCTION_KEY |
+--------------+
|          186 |
+--------------+
1 row in set (0.00 sec)

mysql> select FUNCTION_KEY from SAKAI_REALM_FUNCTION where FUNCTION_NAME='sitestats.admin.view';
+--------------+
| FUNCTION_KEY |
+--------------+
|          187 |
+--------------+
1 row in set (0.00 sec)


Regards
Anders Nordkvist
System administrator
University Of Skövde
Sweden






From: Steve Swinsburg [mailto:steve.swinsburg at gmail.com]
Sent: den 6 maj 2013 15:46
To: Anders Nordkvist
Cc: sakai-user at collab.sakaiproject.org<mailto:sakai-user at collab.sakaiproject.org>
Subject: Re: [Using Sakai] Sakai upgrade to 2.9.x mysql question

Hi Anders,

What version sitestats are you currently running in 2.7? In what upgrade script did you receive this error?

Note you can ignore this, as you presumed, the entry already exists.

cheers,
Steve


On 06/05/2013, at 11:28 PM, Anders Nordkvist <anders.nordqvist at his.se<mailto:anders.nordqvist at his.se>> wrote:



Hi guys,

Im testing a database upgrade from Sakai 2.8.x to 2.9.x (we are going to upgrade from 2.7.x to 2.9.x this summer) but I get Mysql errors when inserting values. I suppose it is  because there already is a value for that column?

mysql> INSERT INTO SAKAI_REALM_FUNCTION VALUES (DEFAULT, 'sitestats.admin.view');
ERROR 1062 (23000): Duplicate entry 'sitestats.admin.view' for key 'IE_SAKAI_REALM_FUNCTION_NAME'
mysql> INSERT INTO SAKAI_REALM_FUNCTION VALUES (DEFAULT, 'sitestats.view');
ERROR 1062 (23000): Duplicate entry 'sitestats.view' for key 'IE_SAKAI_REALM_FUNCTION_NAME'
mysql> show create table

Regards
Anders Nordkvist
System administrator
University Of Skövde
Sweden

_______________________________________________
sakai-user mailing list
sakai-user at collab.sakaiproject.org<mailto:sakai-user at collab.sakaiproject.org>
http://collab.sakaiproject.org/mailman/listinfo/sakai-user

TO UNSUBSCRIBE: send email to sakai-user-unsubscribe at collab.sakaiproject.org<mailto:sakai-user-unsubscribe at collab.sakaiproject.org> with a subject of "unsubscribe"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-user/attachments/20130507/ff220a21/attachment-0001.html 


More information about the sakai-user mailing list