Hello,
I have created a test setup for the purpose of investigating if I could use the Database Scripts module in the future. Here are the steps and results.
1 - Take 3 snapshots of the DB for the Development, Last-Merge and Production after following the guidelines about preparing the CCK module
2 - Restored "production none" to the server that will be production
3 - Restored "development" to the development/test server
4 - Created a book in the production (node id 36) and a child article (Node ID 37) and have made a book a part of primary menu. Have also added a new user
5 - On the development server have create a book (node 36) and a child article (Node ID 37) and have made it the part of the different primary menu. (all the menu items were existing I have just referenced the new content in them.
6 - Dumped new production to production min and development to development
7 - Attempted a merge and have received the conflicts in following tables:
(
[0] => menu_links
[1] => node
[2] => node_revisions
[3] => users
)
In menu_links new menu items did not auto-increment and therefore conflicted, being with the same ID's
In nodes the same situation, and same in the revisions
In the users database the user I have used to test have had different hashes? and therefore also conflicted. I do not understand this as it is clearly supposed to pick the production values.
My questions:
Is this behavior expected? Do I have to manually update all the above tables? It seams that some part of the auto-increment functionality either is not updated to support the new db schema or I am expecting the functionality that is not there. Even though the actions I have performed were quite simple. Please help me to understand which is the case. Would love to provide more information if needed and help to troubleshoot.
Dimitri
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | dbscripts-autoinc-670442.patch | 1.64 KB | stephan_allner |
Comments
Comment #1
monsterru commentedAfter further investigation I have found that the book that was created in the development environment have not been recreated as a book in the merged database. The nodes have been created however all the book alignments were lost. Production had been preserved.
Comment #2
sethfair commentedI saw an issue already existed, so I thought I'd add to it the issue i'm having. I have a proper stage/last-merge/production setup. Then changes are being made on production and within development and last-merge is of course staying the same and should determine properly if items are being removed or added at merge time. Changes on productions are new blog posts, comments, etc. Changes within development are new pages, remove pages, change menu and navigation. I'd like to bring them together for a new release, but unfortunately i'm running into conflicts.
When I merge I get the following conflicts:
Array
(
[0] => node
[1] => node_revisions
[2] => url_alias
)
A look at node.sql:
<<<<<<< ./databases/tmp/dev/data/node.sql
INSERT INTO `node` VALUES (1240,1918,'page','About',139,1,1264199814,1264199815,0,0,0,0,'',0,0);
INSERT INTO `node` VALUES (1241,1919,'page','Solutions',139,1,1264199872,1264199872,0,0,0,0,'',0,0);
INSERT INTO `node` VALUES (1242,1920,'page','Community',139,1,1264199922,1264199922,0,0,0,0,'',0,0);
INSERT INTO `node` VALUES (1243,1921,'page','Support',139,1,1264199995,1264199995,0,0,0,0,'',0,0);
=======
INSERT INTO `node` VALUES (1240,1918,'blog','test 1',139,1,1264198557,1264198557,2,1,0,0,'',0,0);
INSERT INTO `node` VALUES (1241,1919,'blog','test 2',139,1,1264198659,1264198659,2,1,0,0,'',0,0);
INSERT INTO `node` VALUES (1242,1920,'blog','test 3',139,1,1264198823,1264198823,2,1,0,0,'',0,0);
>>>>>>> ./databases/production/data/node.sql
Node.sql conflict shows that changes on development are clashing with changes on production. How am I suppose to resolve this? Do I need to manually make changes or is there an autoincrementing problem? Thanks.
Comment #3
stephan_allner commentedpatch attached. just changed 3 lines:
* first line seems like a strange typo (it could have never worked like this)
* second line is not necessary (i only like the merge-files more, if prod is on the left side)
* third line was necessary, cause the grep got both line with autoincrement and this time the first (id-name) was needed ("`nid` int(10) unsigned NOT NULL auto_increment" vs ") ENGINE=MyISAM AUTO_INCREMENT=3067 DEFAULT CHARSET=utf8")
for me the autoincrement values are now correctly increased. the conflict of course still happens, because for the 3-way merge there are new lines from both new sources at the same position. But the conflict can be easily resolved because the ids are right.
A Solution for this could be to split the old parts (that also exist in last-merge) from the new parts (new on prod and new on dev). Then 3-way merge old parts and just add new content from prod and dev. Since we will use dbscripts soon, i will probably implement this in the near future.
i think dbscripts is a quite useful module, but it seems a bit unmaintained (the help-bug-patch (724838) is not committed yet and other issues are unresolved). Is there a chance of new releases with at least bugfixes ?
stephan
Comment #4
sapox commentedSubscribing.
I'm facing the same problems.