-
As I look on the schema for MySQL it looks like the order of the statements was changed at some point (maybe during refactoring - to modify multiple columns at once as it improoved performance of table schema modification). As a result those columns were not dropped.
Should we update this schema to make sure that they are dropped?
-
I've just "recreated" schema for MySQL (on the new database) in version 2.0.0 and upgrade it to version 3.0.0 and problematic fields were removed.
I would say that we have an issue with current version of the database on tigase.org caused by any of the following:
- manual running of the update due to initial issues with upgrade of the database
- subsequent upgrades between snapshot builds did not upgrade database properly
- manual start of previous version of the schema script set version to "stable" so subsequent runs of schema upgrade were not executed
As for point 3. we still have following line there:
call TigSetComponentVersion('message-archiving', '3.0.0');
What we can do?
- Leave it as it is, as it removes columns properly while running normal upgrade process.
- Add additional checks to remove those columns
I suppose, that I've manually removed
msg_id
column as we had some constraint issues and had to fix them on this database, so it is most likely that I've forgot to drop the rest of those columns and condition to drop them is based on existence ofmsg_id
columns. -
I'm sorry I haven't made myself more clear - tigase.org database/schema is correct. Cleanly created postgres schema contains those additional fields (indicated in the table in the first message). It seems that the SP from the linked commit is not applied correctly here.
Type |
Bug
|
Priority |
Normal
|
Assignee | |
Version |
tigase-server-8.2.0
|
While working on migration I noticed that cleanly created postgresql differ from (existing on tigase.org) mysql schema, namely
tig_ma_msgs
table.| Mysql | Postgres | |-|-| | owner_id | owner_id | | buddy_id | buddy_id | | ts | ts | | msg | msg | | | direction | | | type | | body | body | | | stanza_hash | | | buddy_res | | stable_id | stable_id | | stanza_id | stanza_id | | ref_stable_id | ref_stable_id | | is_ref | is_ref |
It looks that the intention was to drop those columns