Working with database
-
Hi @mouseluka,
As you've outlined in chat, you want to migrate your existing NodeBB data from database 0 to database 10, due to errors encountered when you attempted to upgrade NodeBB.
However, I fail to see why moving your data from database 0 to 10 would resolve any issues, you would still run into the same errors as before.
What errors do you see when you run NodeBB on database 0?
-
node app --setup
after all of steps write next:
Which database to use (0..n) (0)
info: Configuration Saved OK
warn: You have no redis password setup!
info: Populating database with default configs, if not already set...
info: Administrator found, skipping Admin setup
info: Categories OK. Found 16 categories.
info: Enabling default plugins
warn: [plugins/nodebb-theme-vanilla] staticDir is deprecated, use staticDirs instead
info: Beginning database schema update
info: [2014/1/5] categories active users skipped
info: [2014/1/5] Re-slugify usernames (again) skipped
info: [2014/1/7] Update to topic and user posts to sorted set skipped
info: [2014/1/13] Set up "Registered Users" user group - skipped
info: [2014/1/19] Remove user search from Reds -- skipped
info: [2014/1/23] Updating Administrators Group -- skipped
info: [2014/1/25] Updating User Gravatars to HTTPS -- skipped
info: [2014/1/25] Activating SSO plugins, if set up -- skipped
info: [2014/1/30] Fixing language settings -- skipped
info: [2014/1/30] Adding new topic sets -- skipped
info: [2014/2/6] Upvoting all favourited posts for each user -- skipped
info: [2014/2/7] Updating category recent replies -- skipped
info: [2014/2/9] Remove Topic LastFeedUpdate value, as feeds are now on-demand - skipped
error: [upgrade] Errors were encountered while updating the NodeBB schema: Error: ERR Operation against a key holding the wrong kind of value -
If you do sequentially https://github.com/designcreateplay/NodeBB
and specify the base 0
Which database to use (0..n) (0)
info: Configuration Saved OK
warn: You have no redis password setup!
info: Populating database with default configs, if not already set...
info: Administrator found, skipping Admin setup/www-community/node_modules/redis/index.js:516
throw callback_err;
^
TypeError: Cannot read property 'categories' of undefined
at /www-community/src/install.js:313:15
at Command.callback (/www-community/src/categories.js:168:12)
at RedisClient.return_error (/www-community/node_modules/redis/index.js:512:25)
at HiredisReplyParser.<anonymous> (/www-community/node_modules/redis/index.js:263:14)
at HiredisReplyParser.EventEmitter.emit (events.js:95:17)
at HiredisReplyParser.execute (/www-community/node_modules/redis/lib/parser/hiredis.js:41:18)
at RedisClient.on_data (/www-community/node_modules/redis/index.js:488:27)
at Socket.<anonymous> (/www-community/node_modules/redis/index.js:82:14)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:746:14) -
return next();
Added to line 635
return next ();root@wasd:/www# node app --upgrade
info: NodeBB v0.3.2 Copyright (C) 2013 DesignCreatePlay Inc.
info: This program comes with ABSOLUTELY NO WARRANTY.
info: This is free software, and you are welcome to redistribute it under certain conditions.
info:
warn: You have no redis password setup!
info: Beginning database schema update
info: [2014/1/5] categories active users skipped
info: [2014/1/5] Re-slugify usernames (again) skipped
info: [2014/1/7] Update to topic and user posts to sorted set skipped
info: [2014/1/13] Set up "Registered Users" user group - skipped
info: [2014/1/19] Remove user search from Reds -- skipped
info: [2014/1/23] Updating Administrators Group -- skipped
info: [2014/1/25] Updating User Gravatars to HTTPS -- skipped
info: [2014/1/25] Activating SSO plugins, if set up -- skipped
info: [2014/1/30] Fixing language settings -- skipped
info: [2014/1/30] Adding new topic sets -- skipped
info: [2014/2/6] Upvoting all favourited posts for each user -- skipped
info: [2014/2/7] Updating category recent replies -- skipped
info: [2014/2/9] Remove Topic LastFeedUpdate value, as feeds are now on-demand - skipped
error: [upgrade] Errors were encountered while updating the NodeBB schema: Error: ERR Operation against a key holding the wrong kind of value