cancel
Showing results for 
Search instead for 
Did you mean: 

MySQL modifications (change next node_id)

enemarke
Champ in-the-making
Champ in-the-making
Hi,

I have set Alfresco up to use the node_id as document id by showing sys:node-dbid.
Now I would like to have the node_id start at ie 10000 for a new database, is that possible and which variable should I change in the database?

/Emil
1 REPLY 1

enemarke
Champ in-the-making
Champ in-the-making
Hi,

I tried looking into adding a new entry to the mysql database, but my sql skills are not that good. So any help i very much appreciated. I tried to:

INSERT INTO alf_node_properties (node_id,actual_type_n,persisted_type_n,boolean_value,long_value,float_value,double_value,string_value,serializable_value,qname_id,list_index,locale_id) VALUES(20000,6,6,0,0,0,0,0,NULL,935,-1,2);
But this gave the error:

ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`alfresco/alf_node_properties`, CONSTRAINT `fk_alf_nprop_n` FOREIGN KEY (`node_id`) REFERENCES `alf_node` (`id`))
As far as I know this is because the node_id is referring to another table with node_id, but I don't know how to add to multiple tables and how to ensure that I'm adding to the right tables.

Also I'm not sure that this is the right way to go, to try and make the next node_id start with 20001. So any suggestion on other ways how to do this is appreciated.

/Emil