Commit Graph
19 Commits
Author SHA1 Message Date
louiz’ 0b51e38281 MaxHistoryLength now has some sensible default value if the user set a negative one 2018-08-23 20:30:11 +02:00
louiz’ 61de6b1dac Revert "Use a different Date data type"
This reverts commit 857c7d3972.
2018-04-24 20:25:40 +02:00
louiz’ 857c7d3972 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
2018-04-11 00:25:18 +02:00
louiz’ 03714c6ceb Revert "Use std::optional<bool> instead of OptionalBool"
This reverts commit ba879a882e.
2018-03-17 17:28:47 +01:00
louiz’ d0e3c71b91 Revert "Use if constexpr to make things a lot more readable"
This reverts commit d62ca9f879.
2018-03-17 17:28:41 +01:00
louiz’ d62ca9f879 Use if constexpr to make things a lot more readable 2018-03-16 01:13:50 +01:00
louiz’ ba879a882e Use std::optional<bool> instead of OptionalBool 2018-03-16 01:13:50 +01:00
louiz’ dbb86bcc12 Fix the actual_bind versions for integrals 2018-02-15 16:54:54 +01:00
louiz’ fd9c713938 Fix a few warnings 2018-02-11 23:39:42 +01:00
louiz’ 9bf81a2c04 This should fix the int conversion warning on 32bits arch 2018-01-28 14:10:14 +01:00
louiz’ 7e64a2e361 Add a DEBUG_SQL_QUERIES to log info about the executed SQL queries
fix #3324
2018-01-14 21:46:49 +01:00
louiz’ 414bbca0bc Handle postgresql and sqlite3 libs properly
Do not fail to compile when one of them is missing but the other one is not.

Raise an error when trying to open a database with the missing library.

see #3237
2017-12-02 20:08:50 +01:00
louiz’ 0168b96b79 Add postgresql support 2017-12-02 20:08:47 +01:00
louiz’ fd7ee48a86 Remove many log_debug from the database module 2017-07-08 18:11:25 +02:00
louiz’ b71ca15a0f Move a few functions from select_query to query 2017-06-23 00:13:38 +02:00
louiz’ 40db183e37 Using OptionalBool, add RecordHistoryOptional col into IrcChannelOptions table
ref #3269
2017-06-16 09:54:36 +02:00
louiz’ 34ed2cc1a9 Explicitely declare the add_param<Id> specialization 2017-06-14 17:25:15 +02:00
louiz’ 9defd0ccb7 Add a Statement class to manage the sqlite3_stmt objects and avoid leaks 2017-06-14 00:19:15 +02:00
louiz’ 50cadf3dac Implement our own database ORM, and update the whole code to use it
Entirely replace LiteSQL

fix #3271
2017-06-14 00:19:15 +02:00