News:

We really need your input in this questionnaire

Main Menu

Downgrade database

Started by colaboy, March 29, 2011, 02:30:01 PM

Previous topic - Next topic

colaboy

I am using mysql database, I just downgrade from 1.1 to 1.0.10, but I cannot downgrade the database, any way to do that?



Checking database:
Your database has format version 221, this tool is compiled for version 105.
You need to upgrade your server before using this database.
Database check aborted


Thank you.

colaboy

Is it safe to change the SchemaVersion in table metadata?

Victor Kirhenshtein

Hi!

There are no standard downgrade procedure. It is not safe to just change schema version. I'll take a look how to downgrade database manually.

Best regards,
Victor

Victor Kirhenshtein

You can try to execute the following SQL script to downgrade database:

DROP TABLE ap_common;
DROP TABLE ap_bindings;
DROP TABLE ap_config_files;
ALTER TABLE items DROP COLUMN system_tag;

ALTER TABLE users DROP COLUMN auth_failures;
ALTER TABLE users DROP COLUMN last_passwd_change;
ALTER TABLE users DROP COLUMN min_passwd_length;
ALTER TABLE users DROP COLUMN disabled_until;
ALTER TABLE users DROP COLUMN last_login;
ALTER TABLE users DROP COLUMN password_history;

DROP TABLE network_maps;
DROP TABLE network_map_elements;
DROP TABLE network_map_links;

UPDATE metadata SET var_value='105';

Best regards,
Victor

colaboy

Thanks~ The core is running normal now. But it will stop everytime when I amend the event processing policy. And return "Unable to determine database syntax.

I am planning to make a clean install and migrate data to it.

testos

Hi.

QuoteYou can try to execute the following SQL script to downgrade database:

DROP TABLE ap_common
...;

Is valid this script for downgrade database from 1.1.1 to 1.1.0?

For these situations, it would be nice nxdbmgr tool had a downgrade option

Best regards.

Victor Kirhenshtein

No ready to use script. I have to create one. Could you please try my posted patch first, and if it will not help, I'll create downgrade script.

Best regards,
Victor

testos

Okay. Thank you very much.

Best regards.