Menu

PREINSTALLED-RCMD031

Carlos Celso de Almeida

Return HOME or PREINSTALLED

CONSIDERATIONS:

      The update database is required to allow new features and operations.

      It is mandatory for system pre-installled on v0.3.1 or lower

      If you using databases create on RCMD v0.3.2 ou high the update is not required.

      If you do not want review the current database you must (is not recommended):

      *) set NODE_OPTIONS to 0 (ZERO) on '/etc/rcmd.d/rcmd.conf' or;

      *) add the option '-without-node-options' in the CLI;

         # rcmd -without-node-options ...
         # rcmdmgnt -without-node-options ...

UPDATE SQLITE DATABASE:

      The following lines use '/var/lib/rcmd/db/rcmd.db' as database and 'node' as table as an example;

      Checking current configuration

        # sqlite3 /var/lib/rcmd/db/rcmd.db
        ...
        Enter ".help" for usage hints.
        sqlite> .schema
        sqlite> .indices
        sqlite> .q

      Adding primary key

        # sqlite3 /var/lib/rcmd/db/rcmd.db
        ...
        sqlite> alter table node add primary key(node_name);
        sqlite> .w
        sqlite> .q

      Adding node-options support in table layout

        # sqlite3 /var/lib/rcmd/db/rcmd.db
        ...
        sqlite> alter table node add node_options TEXT after node_tags;
        sqlite> update node set node_options='';
        sqlite> .w
        sqlite> .q

      Adding index

        # sqlite3 /var/lib/rcmd/db/rcmd.db
        ...
        sqlite> create unique index index_node on node (node_name);
        sqlite> .w
        sqlite> .q

UPDATE MYSQL/MARIADB DATABASE:

      The following lines use 'rcmd' as database and 'node' as table as an example;

      Checking current configuration

        # mysql
        ...
        MariaDB [(none)]> desc rcmd.node;
        MariaDB [(none)]> show index from rcmd.node;
        MariaDB [(none)]> quit

      Adding primary key

        # mysql
        ...
        MariaDB [(none)]> alter table rcmd.node add primary key(node_name);
        MariaDB [(none)]> quit

      Adding node-options support in table layout

        # mysql
        ...
        MariaDB [(none)]> alter table rcmd.node add node_options text after node_tags;
        MariaDB [(none)]> update node set node_options='';
        MariaDB [(none)]> quit

      Adding index

        # mysql
        ...
        MariaDB [(none)]> create unique index index_node on rcmd.node (node_name);
        MariaDB [(none)]> quit

UPDATE POSTGRESQL DATABASE:

      The following lines use 'rcmd' as database and 'node' as table as an example;

      Checking current configuration

        # psql -U postgres -b rcmd
        ...
        rcmd=# \d node
        rcmd=# \q

      Adding primary key

        # psql -U postgres -b rcmd
        ...
        rcmd=# alter table node add primary key(node_name);
        rcmd=# \q

      Adding node-options support in table layout

        # psql -U postgres -b rcmd
        ...
        rcmd=# alter table node add node_options text;
        rcmd=# update node set node_options='';
        rcmd=# \q

      Adding index

        # psql -U postgres -b rcmd
        ...
        rcmd=# create unique index index_node on node (node_name);
        rcmd=# \q

ENDED


MongoDB Logo MongoDB