<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Database schema upgrade, sqlite]]></title><description><![CDATA[<p dir="auto">Dear support team,<br />
i have problem with my sqlite database which im using in docker image on debian 10 base, im unable to upgrade database schema from version 39.8 to 39.9</p>
<p dir="auto">before i write this forum topic i check consistency of migrated db, and all checks are ok.</p>
<p dir="auto">Upgrade db schema ends in step 39.8 to 39.9 and not continue further, any idea what to check ?</p>
<p dir="auto">Docker image is avalible here &gt; <a href="https://hub.docker.com/repository/docker/madmucho/netxms/general" rel="nofollow ugc">https://hub.docker.com/repository/docker/madmucho/netxms/general</a><br />
i stopped all services in docker using supervisorctl stop all<br />
update distro packages and during package update process upgrade schema hangs.</p>
<p dir="auto">In attachment is screen of update proces on which step upgrade stops and not continue further.</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000005601-jaj.PNG" alt="jaj.PNG" class="img-markdown  img-fluid" width="657" height="402" /></p>
]]></description><link>https://forum.netxms.org/topic/7258/database-schema-upgrade-sqlite</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 11:47:29 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7258.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 24 Nov 2021 12:18:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Database schema upgrade, sqlite on Wed, 01 Dec 2021 12:51:24 GMT]]></title><description><![CDATA[<p dir="auto">Thank You Victor,<br />
after sqlite db modification update procedure continues and done successfully.</p>
<p dir="auto">Ok then i will create new base image and put it on dockerhub for other to use version with this manual fix.<br />
But upgrade from old image will still be not possible because after docker start i begin upgrading db schema, and if user have old sqlite db it will not upgrade correctly, nxdbmgr hangs and because it is in entry point of docker image, docker image will not start up netxms service and agent.</p>
<p dir="auto">Please it is possible make fix it into nxdbmgr, to do same manual fix? If it will be in new version i will release docker image with this fix, upgrade procedure will be automatic.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/victor" aria-label="Profile: victor">@<bdi>victor</bdi></a> said in <a href="/post/30830">Database schema upgrade, sqlite</a>:</p>
<blockquote>
<p dir="auto">Next it tries to open second connection to database, which I suppose is not working for SQLite. Do you have any network maps configured?</p>
<p dir="auto">If you <strong>DO NOT</strong> have any network maps, you can do this step manually by executing the following queries (it will delete any configured links on network maps):</p>
<pre><code>DROP TABLE network_map_links;
CREATE TABLE network_map_links
(
  map_id integer not null,
  link_id integer not null,
  element1 integer not null,
  element2 integer not null,
  link_type integer not null,
  link_name varchar(255) null,
  connector_name1 varchar(255) null,
  connector_name2 varchar(255) null,
  element_data varchar null,
  flags integer not null,
  color_source integer not null,
  color integer not null,
  color_provider varchar(255) null,
  PRIMARY KEY(map_id,link_id)
);
CREATE INDEX idx_network_map_links_map_id ON network_map_links(map_id);
UPDATE metadata SET var_value='9' WHERE var_name='SchemaVersionMinor';
</code></pre>
<p dir="auto">And then run nxdbmgr upgrade again - it should continue from next step.</p>
<p dir="auto">Best regards,<br />
Victor</p>
</blockquote>
]]></description><link>https://forum.netxms.org/post/30841</link><guid isPermaLink="true">https://forum.netxms.org/post/30841</guid><dc:creator><![CDATA[madmucho]]></dc:creator><pubDate>Wed, 01 Dec 2021 12:51:24 GMT</pubDate></item><item><title><![CDATA[Reply to Database schema upgrade, sqlite on Tue, 30 Nov 2021 15:06:45 GMT]]></title><description><![CDATA[<p dir="auto">Next it tries to open second connection to database, which I suppose is not working for SQLite. Do you have any network maps configured?</p>
<p dir="auto">If you <strong>DO NOT</strong> have any network maps, you can do this step manually by executing the following queries (it will delete any configured links on network maps):</p>
<pre><code>DROP TABLE network_map_links;
CREATE TABLE network_map_links
(
  map_id integer not null,
  link_id integer not null,
  element1 integer not null,
  element2 integer not null,
  link_type integer not null,
  link_name varchar(255) null,
  connector_name1 varchar(255) null,
  connector_name2 varchar(255) null,
  element_data varchar null,
  flags integer not null,
  color_source integer not null,
  color integer not null,
  color_provider varchar(255) null,
  PRIMARY KEY(map_id,link_id)
);
CREATE INDEX idx_network_map_links_map_id ON network_map_links(map_id);
UPDATE metadata SET var_value='9' WHERE var_name='SchemaVersionMinor';
</code></pre>
<p dir="auto">And then run nxdbmgr upgrade again - it should continue from next step.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/30830</link><guid isPermaLink="true">https://forum.netxms.org/post/30830</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Tue, 30 Nov 2021 15:06:45 GMT</pubDate></item><item><title><![CDATA[Reply to Database schema upgrade, sqlite on Tue, 30 Nov 2021 11:11:25 GMT]]></title><description><![CDATA[<p dir="auto">Dear Victor,<br />
thank you for reply.</p>
<pre><code>nxdbmgr -t update
</code></pre>
<p dir="auto">Output is attached in screen and last query in text.</p>
<pre><code>CREATE TABLE new_network_map_links (   map_id integer not null,   link_id integer not null,   element1 integer not null,   element2 integer not nul
l,   link_type integer not null,   link_name varchar(255) null,   connector_name1 varchar(255) null,   connector_name2 varchar(255) null,   element_dat
a varchar null,   flags integer not null,   color_source integer not null,   color integer not null,   color_provider varchar(255) null,   PRIMARY KEY(
map_id,link_id))
</code></pre>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000005607-1.PNG" alt="1.PNG" class="img-markdown  img-fluid" width="1214" height="118" /></p>
]]></description><link>https://forum.netxms.org/post/30823</link><guid isPermaLink="true">https://forum.netxms.org/post/30823</guid><dc:creator><![CDATA[madmucho]]></dc:creator><pubDate>Tue, 30 Nov 2021 11:11:25 GMT</pubDate></item><item><title><![CDATA[Reply to Database schema upgrade, sqlite on Fri, 26 Nov 2021 16:27:03 GMT]]></title><description><![CDATA[<p dir="auto">Try to run upgrade with option -t - it will trace SQL queries so we will see what query cause this.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/30812</link><guid isPermaLink="true">https://forum.netxms.org/post/30812</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Fri, 26 Nov 2021 16:27:03 GMT</pubDate></item></channel></rss>