[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mtos-dev
Subject:    [MTOS-dev] Weird behavior when I change the schema_version variable
From:       "Michael Thomsen" <mikerthomsen () gmail ! com>
Date:       2008-09-27 19:56:30
Message-ID: 22bb517f0809271256l2296b65dnc52d1006bce101d9 () mail ! gmail ! com
[Download RAW message or body]

I got this error when mt-upgrade.cgi ran: Error during upgrade: failed
to execute statement ALTER TABLE mt_link_node MODIFY link_node_id
integer PRIMARY KEY: Multiple primary key defined at lib/MT/Upgrade.pm
line 2595.

When I tried to add the following object:


package LinkManager::LinkNode;

use base qw(MT::Object MT::Taggable);

__PACKAGE__->install_properties({

	column_defs => {
		'id'		=>	'integer',
		'list_id'	=>	'integer',
		'parent_id'	=>	'integer',
		'label'		=>	'string(255)',
		'link'		=>	'string(255)'
	},
	datasource => 'link_node',
	primary_key => 'id'

});

1;

I fixed it by adding "not null auto_increment" to "id." Is this normal
behavior for when you increment the schema_version under a scenario
like this?
_______________________________________________
MTOS-dev mailing list
MTOS-dev@sixapart.com
http://www.sixapart.com/mailman/listinfo/mtos-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic