aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/database.vala
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src/service/database.vala')
-rw-r--r--libdino/src/service/database.vala24
1 files changed, 22 insertions, 2 deletions
diff --git a/libdino/src/service/database.vala b/libdino/src/service/database.vala
index 17499404..98e18d16 100644
--- a/libdino/src/service/database.vala
+++ b/libdino/src/service/database.vala
@@ -7,7 +7,7 @@ using Dino.Entities;
namespace Dino {
public class Database : Qlite.Database {
- private const int VERSION = 19;
+ private const int VERSION = 20;
public class AccountTable : Table {
public Column<int> id = new Column.Integer("id") { primary_key = true, auto_increment = true };
@@ -155,6 +155,24 @@ public class Database : Qlite.Database {
}
}
+ public class CallTable : Table {
+ public Column<int> id = new Column.Integer("id") { primary_key = true, auto_increment = true };
+ public Column<int> account_id = new Column.Integer("account_id") { not_null = true };
+ public Column<int> counterpart_id = new Column.Integer("counterpart_id") { not_null = true };
+ public Column<string> counterpart_resource = new Column.Text("counterpart_resource");
+ public Column<string> our_resource = new Column.Text("our_resource");
+ public Column<bool> direction = new Column.BoolInt("direction") { not_null = true };
+ public Column<long> time = new Column.Long("time") { not_null = true };
+ public Column<long> local_time = new Column.Long("local_time") { not_null = true };
+ public Column<long> end_time = new Column.Long("end_time");
+ public Column<int> state = new Column.Integer("state");
+
+ internal CallTable(Database db) {
+ base(db, "call");
+ init({id, account_id, counterpart_id, counterpart_resource, our_resource, direction, time, local_time, end_time, state});
+ }
+ }
+
public class ConversationTable : Table {
public Column<int> id = new Column.Integer("id") { primary_key = true, auto_increment = true };
public Column<int> account_id = new Column.Integer("account_id") { not_null = true };
@@ -275,6 +293,7 @@ public class Database : Qlite.Database {
public MessageCorrectionTable message_correction { get; private set; }
public RealJidTable real_jid { get; private set; }
public FileTransferTable file_transfer { get; private set; }
+ public CallTable call { get; private set; }
public ConversationTable conversation { get; private set; }
public AvatarTable avatar { get; private set; }
public EntityIdentityTable entity_identity { get; private set; }
@@ -298,6 +317,7 @@ public class Database : Qlite.Database {
message_correction = new MessageCorrectionTable(this);
real_jid = new RealJidTable(this);
file_transfer = new FileTransferTable(this);
+ call = new CallTable(this);
conversation = new ConversationTable(this);
avatar = new AvatarTable(this);
entity_identity = new EntityIdentityTable(this);
@@ -306,7 +326,7 @@ public class Database : Qlite.Database {
mam_catchup = new MamCatchupTable(this);
settings = new SettingsTable(this);
conversation_settings = new ConversationSettingsTable(this);
- init({ account, jid, entity, content_item, message, message_correction, real_jid, file_transfer, conversation, avatar, entity_identity, entity_feature, roster, mam_catchup, settings, conversation_settings });
+ init({ account, jid, entity, content_item, message, message_correction, real_jid, file_transfer, call, conversation, avatar, entity_identity, entity_feature, roster, mam_catchup, settings, conversation_settings });
try {
exec("PRAGMA journal_mode = WAL");