1 //
2 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2021
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 #pragma once
8
9 #include "td/utils/common.h"
10
11 namespace td {
12
13 constexpr int32 MTPROTO_LAYER = 135;
14
15 enum class Version : int32 {
16 Initial, // 0
17 StoreFileId,
18 AddKeyHashToSecretChat,
19 AddDurationToAnimation,
20 FixStoreGameWithoutAnimation,
21 AddAccessHashToSecretChat, // 5
22 StoreFileOwnerId,
23 StoreFileEncryptionKey,
24 NetStatsCountDuration,
25 FixWebPageInstantViewDatabase,
26 FixMinUsers, // 10
27 FixPageBlockAudioEmptyFile,
28 AddMessageInvoiceProviderData,
29 AddCaptionEntities,
30 AddVenueType,
31 AddTermsOfService, // 15
32 AddContactVcard,
33 AddMessageUnsupportedVersion,
34 SupportInstantView2_0,
35 AddNotificationGroupInfoMaxRemovedMessageId,
36 SupportMinithumbnails, // 20
37 AddVideoCallsSupport,
38 AddPhotoSizeSource,
39 AddFolders,
40 SupportPolls2_0,
41 AddDiceEmoji, // 25
42 AddAnimationStickers,
43 AddDialogPhotoHasAnimation,
44 AddPhotoProgressiveSizes,
45 AddLiveLocationHeading,
46 AddLiveLocationProximityAlertDistance, // 30
47 SupportBannedChannels,
48 RemovePhotoVolumeAndLocalId,
49 Support64BitIds,
50 AddInviteLinksRequiringApproval,
51 AddKeyboardButtonFlags, // 35
52 Next
53 };
54
55 enum class DbVersion : int32 {
56 DialogDbCreated = 3,
57 MessagesDbMediaIndex,
58 MessagesDb30MediaIndex,
59 MessagesDbFts,
60 MessagesCallIndex,
61 FixFileRemoteLocationKeyBug,
62 AddNotificationsSupport,
63 AddFolders,
64 AddScheduledMessages,
65 StorePinnedDialogsInBinlog,
66 AddMessageThreadSupport,
67 Next
68 };
69
current_db_version()70 inline constexpr int32 current_db_version() {
71 return static_cast<int32>(DbVersion::Next) - 1;
72 }
73
74 } // namespace td
75