Use a different Date data type

PLEASE backup your database before testing this commit, and report any
migration issue.

In postgresql, we use timestamp with timezone.
In sqlite3 we use REAL (the date is expressed as julianday)

This requires a migration of the muclogline_ table:
In postgresql it’s pretty simple, we convert all the integer into timestamps

With sqlite3, we actually rename the table, create the new one with the
correct type, then copy everything to the new table, with a conversion
function for the Date_ column, and then we delete the old table.

fix #3343
This commit is contained in:
louiz’
2018-04-11 00:25:18 +02:00
parent 0cd848e532
commit 857c7d3972
21 changed files with 417 additions and 46 deletions
+2
View File
@@ -1,6 +1,8 @@
Version 8.0
===========
- Changed the data type used to store the dates in the database. This
requires an automatic migration on the first start.
- Add a complete='true' in MAM’s iq result when appropriate
- The “virtual” channel with an empty name (for example
%irc.freenode.net@biboumi) has been entirely removed.