• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Working with database

Scheduled Pinned Locked Moved NodeBB Development
9 Posts 2 Posters 3.4k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mouseluka
    wrote on last edited by
    #1

    I installed base number 10 redis

    as well as which fields to move into this database from the old (base number 0)?

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #2

    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?

    1 Reply Last reply
    0
  • M Offline
    M Offline
    mouseluka
    wrote on last edited by
    #3

    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

    1 Reply Last reply
    0
  • M Offline
    M Offline
    mouseluka
    wrote on last edited by
    #4

    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)

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #5

    Please go into upgrade.js and find the line that reads like this:

    thisSchemaDate = new Date(2014, 1, 14, 21, 50).getTime();

    Then add this right above it: return next();

    Then try running ./nodebb upgrade again.

    1 Reply Last reply
    0
  • M Offline
    M Offline
    mouseluka
    wrote on last edited by
    #6

    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

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #7

    @mouseluka My mistake, please add it above the line that reads:

    thisSchemaDate = new Date(2014, 1, 14, 20, 50).getTime();

    1 Reply Last reply
    0
  • M Offline
    M Offline
    mouseluka
    wrote on last edited by
    #8

    Thanks, it helped restore forum)

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #9

    Phew! Glad to hear it @mouseluka 🙂

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development