[SOLVED] Upgrading NodeBB 0.6.0 to 0.7.0+
-
and when I try to update to the latest code from 0.6.x tree:
$ git fetch $ git checkout M public/favicon.ico Your branch and 'origin/v0.6.x' have diverged, and have 4 and 416 different commits each, respectively. (use "git pull" to merge the remote branch into yours) $ git pull Removing src/views/admin/partials/fontawesome.tpl Auto-merging src/socket.io/index.js Auto-merging src/database/redis/sorted.js CONFLICT (content): Merge conflict in src/database/redis/sorted.js Auto-merging src/controllers/api.js Auto-merging public/src/modules/iconSelect.js Removing public/src/helpers.js Auto-merging package.json CONFLICT (content): Merge conflict in package.json Auto-merging npm-shrinkwrap.json CONFLICT (add/add): Merge conflict in npm-shrinkwrap.json Automatic merge failed; fix conflicts and then commit the result.
-
@julian maybe it's the same problem as https://community.nodebb.org/topic/1183/upgrading-from-0-3-x-to-0-4-x ?
$ git checkout v0.6.x M public/favicon.ico Switched to branch 'v0.6.x' Your branch and 'origin/v0.6.x' have diverged, and have 4 and 416 different commits each, respectively. (use "git pull" to merge the remote branch into yours) $ node app --upgrade 15/6 11:29 [14757] - info: NodeBB v0.6.0 Copyright (C) 2013-2014 NodeBB Inc. 15/6 11:29 [14757] - info: This program comes with ABSOLUTELY NO WARRANTY. 15/6 11:29 [14757] - info: This is free software, and you are welcome to redistribute it under certain conditions. 15/6 11:29 [14757] - info: Warning: Redis server does not require a password, but a password was supplied. Warning: Redis server does not require a password, but a password was supplied. Warning: Redis server does not require a password, but a password was supplied. 15/6 11:29 [14757] - info: Beginning database schema update 15/6 11:29 [14757] - info: [2014/10/31] Applying newbiePostDelay values skipped 15/6 11:29 [14757] - info: [2014/11/6] Updating topic authorship sorted set skipped 15/6 11:29 [14757] - info: [2014/11/7] Renaming sorted sets skipped 15/6 11:29 [14757] - info: [2014/11/11] Upgrading permissions skipped 15/6 11:29 [14757] - info: [2014/11/17] Updating user email digest settings skipped 15/6 11:29 [14757] - info: [2014/11/29] Updating config.json to new format skipped 15/6 11:29 [14757] - info: [2014/12/2] Removing register user fields skipped 15/6 11:29 [14757] - info: [2014/12/12] Updating teasers skipped 15/6 11:29 [14757] - info: [2014/12/20] Updating digest settings skipped 15/6 11:29 [14757] - info: [upgrade] Schema already up to date! $ git checkout v0.7.x M public/favicon.ico Switched to branch 'v0.7.x' Your branch is up-to-date with 'origin/v0.7.x'. $ node app --upgrade 15/6 11:32 [14795] - info: NodeBB v0.7.0 Copyright (C) 2013-2014 NodeBB Inc. 15/6 11:32 [14795] - info: This program comes with ABSOLUTELY NO WARRANTY. 15/6 11:32 [14795] - info: This is free software, and you are welcome to redistribute it under certain conditions. 15/6 11:32 [14795] - info: Warning: Redis server does not require a password, but a password was supplied. Warning: Redis server does not require a password, but a password was supplied. Warning: Redis server does not require a password, but a password was supplied. 15/6 11:32 [14795] - info: Beginning database schema update 15/6 11:32 [14795] - error: [upgrade] NodeBB upgrade could not complete, as your database schema is too far out of date. 15/6 11:32 [14795] - error: [upgrade] Please ensure that you did not skip any minor version upgrades. 15/6 11:32 [14795] - error: [upgrade] (e.g. v0.1.x directly to v0.3.x)
-
@ffmad Here's the output of
git pull
only:$ git pull remote: Counting objects: 13566, done. remote: Compressing objects: 100% (22/22), done. Receiving objects: 100% (13566/13566), 3.64 MiB | 180.00 KiB/s, done. remote: Total 13566 (delta 3262), reused 3256 (delta 3255), pack-reused 10289 Resolving deltas: 100% (10481/10481), completed with 683 local objects. From https://github.com/NodeBB/NodeBB + accee7d...a1f49f6 v0.6.x -> origin/v0.6.x (forced update) * [new branch] ajaxify-cache -> origin/ajaxify-cache * [new branch] ajaxify-render -> origin/ajaxify-render 02e0d46..9dece4a categories_revamp -> origin/categories_revamp * [new branch] composer-mobile -> origin/composer-mobile * [new branch] composer-redesign -> origin/composer-redesign a8acb52..40c9274 disney -> origin/disney * [new branch] group-manage-revamp -> origin/group-manage-revamp * [new branch] grunt-dev -> origin/grunt-dev 21522e5..29c9b2e master -> origin/master * [new branch] omgbower -> origin/omgbower * [new branch] persona -> origin/persona * [new branch] rewards -> origin/rewards * [new branch] sortable-menu -> origin/sortable-menu * [new branch] topic-priv-refactor -> origin/topic-priv-refactor * [new branch] upstart-compat -> origin/upstart-compat * [new branch] v0.7.x -> origin/v0.7.x + d056523...a9015ce web-install -> origin/web-install (forced update) * [new branch] webworkers -> origin/webworkers * [new tag] v0.7.0 -> v0.7.0 * [new tag] v0.6.1 -> v0.6.1 Removing src/views/admin/partials/fontawesome.tpl Auto-merging src/socket.io/index.js Auto-merging src/database/redis/sorted.js CONFLICT (content): Merge conflict in src/database/redis/sorted.js Auto-merging src/controllers/api.js Auto-merging public/src/modules/iconSelect.js Removing public/src/helpers.js Auto-merging package.json CONFLICT (content): Merge conflict in package.json Auto-merging npm-shrinkwrap.json CONFLICT (add/add): Merge conflict in npm-shrinkwrap.json Automatic merge failed; fix conflicts and then commit the result.
Regarding the conflict and choosing files, I don't think that every single nodebb user should have a knowledge about the internal working of the code and npm and redis and [put some other stuff here] in order to upgrade his installation.
Also the upgrade process was going on fine except "updating the database schema" so there was nothing wrong with git pull, fetch, etc. and I believe only one commit or patch is missing there. -
@WildPointer said:
Regarding the conflict and choosing files, I don't think that every single nodebb user should have a knowledge about the internal working of the code and npm and redis and [put some other stuff here] in order to upgrade his installation.
it could happen, NodeBB isn't even is v1 ^^
-
No worries but before I start diving into the coding I have to make sure that someone has successfully upgraded the "0.6.0" to a 0.7.x tree.
Also I feel like this part of wiki is written in Weirdish rathar than simple English:NodeBB’s upgrade path is designed so that upgrading between versions is straightforward. NodeBB will provide upgrade compatibility (via the --upgrade flag) between the latest version of a lower branch and the latest version of the higher branch. For example, if v0.2.2 is the latest version in the v0.2.x branch, you can switch to the v0.3.x branch and suffer no ill effects. Upgrading from v0.2.0 to v0.3.x is not supported, and NodeBB will warn you when attempting to upgrade that you are not upgrading cleanly.
So according to that, "Upgrading from v0.2.0 to v0.3.x is not supported" and it means "You can't upgrade your v.0.6.0 to v0.7.x".
if yes, why the upgrade was 100% fine except updating the database schema, and if no, what's the point of "For example, if v0.2.2 is the latest version in the v0.2.x branch, you can switch to the v0.3.x branch and suffer no ill effects." ?
Now I'm just stuck in v0.6.0 and can't really do anything with my current installation. -
@WildPointer said:
No worries but before I start diving into the coding I have to make sure that someone has successfully upgraded the "0.6.0" to a 0.7.x tree.
Also I feel like this part of wiki is written in Weirdish rathar than simple English:NodeBB’s upgrade path is designed so that upgrading between versions is straightforward. NodeBB will provide upgrade compatibility (via the --upgrade flag) between the latest version of a lower branch and the latest version of the higher branch. For example, if v0.2.2 is the latest version in the v0.2.x branch, you can switch to the v0.3.x branch and suffer no ill effects. Upgrading from v0.2.0 to v0.3.x is not supported, and NodeBB will warn you when attempting to upgrade that you are not upgrading cleanly.
So according to that, "Upgrading from v0.2.0 to v0.3.x is not supported" and it means "You can't upgrade your v.0.6.0 to v0.7.x".
if yes, why the upgrade was 100% fine except updating the database schema, and if no, what's the point of "For example, if v0.2.2 is the latest version in the v0.2.x branch, you can switch to the v0.3.x branch and suffer no ill effects." ?
Now I'm just stuck in v0.6.0 and can't really do anything with my current installation.i'm in the same situation, trying to upgrade to v0.7
I will tell you if it's successful
-
So you mean you've got a problem with "old database schema" as well?
-
@WildPointer said:
So you mean you've got a problem with "old database schema" as well?
Yeah.
First i've installed redis 3.0
apt-get install software-properties-common add-apt-repository ppa:chris-lea/redis-server apt-get update apt-get install redis-server
But there is still a pb with database
15/6 15:58 [3067] - error: [upgrade] NodeBB upgrade could not complete, as your database schema is too far out of date.
15/6 15:58 [3067] - error: [upgrade] Please ensure that you did not skip any minor version upgrades.
15/6 15:58 [3067] - error: [upgrade] (e.g. v0.1.x directly to v0.3.x) -
yeah, sure!
I've installed the redis from the chris' PPA repo but it didn't help me either.(just got rid of "your redis server is too old etc."That pastebin link is my terminal history. I think by far we've done the same things and now I'm sure it's not just me who got into this problem.
Personally I'm a shrimp in node.js' world and all I can do is waiting for someone with more experience to do some magic on it.
-
now it's working and i can't really figure why ^^
I tried checkout tags,
git checkout tags/v0.6.1
andgit checkout tags/v0.7.0
and./nodebb upgrade
for each one, and it seems it worked after that ... -
@ffmad hmm, I've tried the following but it didn't work:
$ git checkout tags/v0.6.1 error: pathspec 'tags/v0.6.1' did not match any file(s) known to git. $ git checkout v0.6.1 error: pathspec 'v0.6.1' did not match any file(s) known to git. $ git checkout tags/v0.7.0 error: pathspec 'tags/v0.7.0' did not match any file(s) known to git. $ git checkout v0.7.0 error: pathspec 'v0.7.0' did not match any file(s) known to git.
maybe I'm doing something wrong?
-
have you done a git fetch before ?
-
@ffmad my bad about
git fetch
but after doing it the way that you said, I just got an absolutely empty board! not even basic example posts there! -
@ffmad yeah, the DB is just fine and when I start another nodejs stance(yet another directory which is v.0.6.0) it's okay.
Also I'm wondering how the upgrade process was success on the DB!16/6 13:49 [2972] - info: NodeBB v0.7.0 Copyright (C) 2013-2014 NodeBB Inc. 16/6 13:49 [2972] - info: This program comes with ABSOLUTELY NO WARRANTY. 16/6 13:49 [2972] - info: This is free software, and you are welcome to redistribute it under certain conditions. 16/6 13:49 [2972] - info: Warning: Redis server does not require a password, but a password was supplied. Warning: Redis server does not require a password, but a password was supplied. Warning: Redis server does not require a password, but a password was supplied. 16/6 13:49 [2972] - info: Beginning database schema update 16/6 13:49 [2972] - info: [2015/02/08] Clearing reset tokens 16/6 13:49 [2972] - info: [2015/02/08] Clearing reset tokens done 16/6 13:49 [2972] - info: [2015/02/17] renaming home.tpl to categories.tpl 16/6 13:49 [2972] - info: [2015/02/17] renaming home.tpl to categories.tpl done 16/6 13:49 [2972] - info: [2015/2/23] Activating NodeBB Essential Rewards 16/6 13:49 [2972] - info: [2015/02/24] Upgrading plugins:active to sorted set 16/6 13:49 [2972] - info: [2015/02/24] Upgrading plugins:active to sorted set done 16/6 13:49 [2972] - info: [2015/02/24] Upgrading privilege groups to system groups 16/6 13:49 [2972] - info: [2015/02/24] Upgrading privilege groups to system groups done 16/6 13:49 [2972] - info: [2015/02/25] Upgrading menu items to dynamic navigation system 16/6 13:49 [2972] - info: [2015/02/25] Upgrading menu items to dynamic navigation system done 16/6 13:49 [2972] - info: [2015/05/07] Upgrading uid mappings to sorted set 16/6 13:49 [2972] - info: [2015/05/07] Upgrading uid mappings to sorted set done 16/6 13:49 [2972] - info: [2015/05/08] Fixing emails 16/6 13:49 [2972] - info: [2015/05/08] Fixing emails done 16/6 13:49 [2972] - info: [2015/05/11] Updating widgets to tjs 0.2x 16/6 13:49 [2972] - info: [2015/05/11] Updating widgets to tjs 0.2x done 16/6 13:49 [2972] - info: [2015/05/20] Adding username:sorted and email:sorted 16/6 13:49 [2972] - info: [2015/05/20] Added username:sorted and email:sorted 16/6 13:49 [2972] - info: [upgrade] Schema update complete!
-
I think now it's time to /BUMP
-
I think I should ask my question in another way:
"Is there anybody out there who has successfully upgraded 0.6.0 to 0.7.0+ ?"
I'm just stuck in this version and can't do anything right now, except creating a new website from scratch and saying a big FU to all users and their posts and reputation!
Perhaps someone is interested in this problem?
I know it's a "community-driven" project and I ain't got no premium subscription or something, but seriously guys, isn't 15 day enough for getting at least a "dude, it's your problem! I've upgraded my forum and it's working."? -
Hey @WildPointer, are you updating this right in your production instance or are you using a dev instance to test it first?
I don't have anything in production yet, but I've been staying on master. In regards to your conflicts though, that happens if I (or some other process) added or modified something in the directory tree.
A git checkout should be sufficient, but then you'd have to make a backup of your db and then call
./nodebb upgrade
to update your db to the new schema if neededI just tried to reproduce what you're trying to do, so here's what I did:
git checkout tags/v0.6.0
... boot up, add some groups, users, and posts, shut down ...
git checkout tags/v0.7.0
./nodebb upgrade
^ at this point, there was a db schema conflict and I couldn't upgrade, so I did:
git checkout tags/v0.6.1
./nodebb upgrade
.. boot up and check everything is fine ...
then, I could do
git checkout tags/v0.7.0
./nodebb upgrade
... boot up and verify upgrade.just make sure you have backups! It's not version 1.0.0 yet so be vigilant about those things. I know I'm not as good at that as I should be
-
@BDHarrington7 Thanks for your reply.
I have two VMs, one of them is production and another one is for test/experiment and the source code is 100% identical between these two machines.(even though once I tried it on production server to make sure it's not sync/copy problem between two machines.)
Actually I've tried many different methods and my forum is just a vanilla one without any modification(except favicon) so I think it's not normal to have conflict with 12-20 files only in the base code.
I'm not sure but I think I've tried this method(the last time) and everything went smoothly until I opened my forum and saw absolutely no content! Only the top menu and footer was there. No user, no post, nothing at all. I'll try again and I'll inform you as soon as I can work with that box.
and about the version, you're right but you should know how it's awful when you feel stuck..
Thanks again, I'll do it ASAP and inform you