chagaif95

Untitled

Dec 30th, 2021
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.76 KB | None | 0 0
  1. matrix_mautrix_telegram=# \d public.*
  2. Table "public.alembic_version"
  3. Column | Type | Collation | Nullable | Default
  4. -------------+------+-----------+----------+---------
  5. version_num | text | | not null |
  6. Indexes:
  7. "idx_147090_sqlite_autoindex_alembic_version_1" PRIMARY KEY, btree (version_num)
  8.  
  9. Table "public.bot_chat"
  10. Column | Type | Collation | Nullable | Default
  11. --------+--------+-----------+----------+---------
  12. id | bigint | | not null |
  13. type | text | | |
  14. Indexes:
  15. "idx_147105_bot_chat_pkey" PRIMARY KEY, btree (id)
  16.  
  17. Table "public.contact"
  18. Column | Type | Collation | Nullable | Default
  19. ---------+--------+-----------+----------+---------
  20. user | bigint | | |
  21. contact | bigint | | |
  22. Indexes:
  23. "idx_147102_sqlite_autoindex_contact_1" UNIQUE, btree ("user", contact)
  24. Foreign-key constraints:
  25. "contact_contact_fkey" FOREIGN KEY (contact) REFERENCES puppet(id)
  26.  
  27. Index "public.idx_147090_sqlite_autoindex_alembic_version_1"
  28. Column | Type | Key? | Definition
  29. -------------+------+------+-------------
  30. version_num | text | yes | version_num
  31. primary key, btree, for table "public.alembic_version"
  32.  
  33. Index "public.idx_147096_sqlite_autoindex_user_1"
  34. Column | Type | Key? | Definition
  35. --------+------+------+------------
  36. mxid | text | yes | mxid
  37. primary key, btree, for table "public.user"
  38.  
  39. Index "public.idx_147096_sqlite_autoindex_user_2"
  40. Column | Type | Key? | Definition
  41. --------+--------+------+------------
  42. tgid | bigint | yes | tgid
  43. unique, btree, for table "public.user"
  44.  
  45. Index "public.idx_147102_sqlite_autoindex_contact_1"
  46. Column | Type | Key? | Definition
  47. ---------+--------+------+------------
  48. user | bigint | yes | "user"
  49. contact | bigint | yes | contact
  50. unique, btree, for table "public.contact"
  51.  
  52. Index "public.idx_147105_bot_chat_pkey"
  53. Column | Type | Key? | Definition
  54. --------+--------+------+------------
  55. id | bigint | yes | id
  56. primary key, btree, for table "public.bot_chat"
  57.  
  58. Index "public.idx_147111_sqlite_autoindex_telethon_sessions_1"
  59. Column | Type | Key? | Definition
  60. ------------+--------+------+------------
  61. session_id | text | yes | session_id
  62. dc_id | bigint | yes | dc_id
  63. primary key, btree, for table "public.telethon_sessions"
  64.  
  65. Index "public.idx_147117_sqlite_autoindex_telethon_sent_files_1"
  66. Column | Type | Key? | Definition
  67. ------------+--------+------+------------
  68. session_id | text | yes | session_id
  69. md5_digest | bytea | yes | md5_digest
  70. file_size | bigint | yes | file_size
  71. type | bigint | yes | type
  72. primary key, btree, for table "public.telethon_sent_files"
  73.  
  74. Index "public.idx_147123_telethon_version_pkey"
  75. Column | Type | Key? | Definition
  76. ---------+--------+------+------------
  77. version | bigint | yes | version
  78. primary key, btree, for table "public.telethon_version"
  79.  
  80. Index "public.idx_147126_sqlite_autoindex_telegram_file_1"
  81. Column | Type | Key? | Definition
  82. --------+------+------+------------
  83. id | text | yes | id
  84. primary key, btree, for table "public.telegram_file"
  85.  
  86. Index "public.idx_147133_sqlite_autoindex_telethon_entities_1"
  87. Column | Type | Key? | Definition
  88. ------------+--------+------+------------
  89. session_id | text | yes | session_id
  90. id | bigint | yes | id
  91. primary key, btree, for table "public.telethon_entities"
  92.  
  93. Index "public.idx_147139_sqlite_autoindex_telethon_update_state_1"
  94. Column | Type | Key? | Definition
  95. ------------+--------+------+------------
  96. session_id | text | yes | session_id
  97. entity_id | bigint | yes | entity_id
  98. primary key, btree, for table "public.telethon_update_state"
  99.  
  100. Index "public.idx_147145_sqlite_autoindex_user_portal_1"
  101. Column | Type | Key? | Definition
  102. -----------------+--------+------+-----------------
  103. user | bigint | yes | "user"
  104. portal | bigint | yes | portal
  105. portal_receiver | bigint | yes | portal_receiver
  106. unique, btree, for table "public.user_portal"
  107.  
  108. Index "public.idx_147148_sqlite_autoindex_mx_user_profile_1"
  109. Column | Type | Key? | Definition
  110. ---------+------+------+------------
  111. room_id | text | yes | room_id
  112. user_id | text | yes | user_id
  113. primary key, btree, for table "public.mx_user_profile"
  114.  
  115. Index "public.idx_147154_puppet_pkey"
  116. Column | Type | Key? | Definition
  117. --------+--------+------+------------
  118. id | bigint | yes | id
  119. primary key, btree, for table "public.puppet"
  120.  
  121. Index "public.idx_147162_sqlite_autoindex_message_1"
  122. Column | Type | Key? | Definition
  123. ------------+--------+------+------------
  124. tgid | bigint | yes | tgid
  125. tg_space | bigint | yes | tg_space
  126. edit_index | bigint | yes | edit_index
  127. primary key, btree, for table "public.message"
  128.  
  129. Index "public.idx_147162_sqlite_autoindex_message_2"
  130. Column | Type | Key? | Definition
  131. ----------+--------+------+------------
  132. mxid | text | yes | mxid
  133. mx_room | text | yes | mx_room
  134. tg_space | bigint | yes | tg_space
  135. unique, btree, for table "public.message"
  136.  
  137. Index "public.idx_147168_sqlite_autoindex_portal_1"
  138. Column | Type | Key? | Definition
  139. -------------+--------+------+-------------
  140. tgid | bigint | yes | tgid
  141. tg_receiver | bigint | yes | tg_receiver
  142. primary key, btree, for table "public.portal"
  143.  
  144. Index "public.idx_147168_sqlite_autoindex_portal_2"
  145. Column | Type | Key? | Definition
  146. --------+------+------+------------
  147. mxid | text | yes | mxid
  148. unique, btree, for table "public.portal"
  149.  
  150. Index "public.idx_147175_sqlite_autoindex_mx_room_state_1"
  151. Column | Type | Key? | Definition
  152. ---------+------+------+------------
  153. room_id | text | yes | room_id
  154. primary key, btree, for table "public.mx_room_state"
  155.  
  156. Table "public.message"
  157. Column | Type | Collation | Nullable | Default
  158. ------------+---------+-----------+----------+---------
  159. mxid | text | | |
  160. mx_room | text | | |
  161. tgid | bigint | | not null |
  162. tg_space | bigint | | not null |
  163. edit_index | bigint | | not null |
  164. redacted | boolean | | | false
  165. Indexes:
  166. "idx_147162_sqlite_autoindex_message_1" PRIMARY KEY, btree (tgid, tg_space, edit_index)
  167. "idx_147162_sqlite_autoindex_message_2" UNIQUE, btree (mxid, mx_room, tg_space)
  168.  
  169. Table "public.mx_room_state"
  170. Column | Type | Collation | Nullable | Default
  171. ----------------------+---------+-----------+----------+---------
  172. room_id | text | | not null |
  173. power_levels | text | | |
  174. encryption | text | | |
  175. has_full_member_list | boolean | | |
  176. is_encrypted | boolean | | |
  177. Indexes:
  178. "idx_147175_sqlite_autoindex_mx_room_state_1" PRIMARY KEY, btree (room_id)
  179.  
  180. Table "public.mx_user_profile"
  181. Column | Type | Collation | Nullable | Default
  182. -------------+------+-----------+----------+---------
  183. room_id | text | | not null |
  184. user_id | text | | not null |
  185. membership | text | | |
  186. displayname | text | | |
  187. avatar_url | text | | |
  188. Indexes:
  189. "idx_147148_sqlite_autoindex_mx_user_profile_1" PRIMARY KEY, btree (room_id, user_id)
  190.  
  191. Table "public.portal"
  192. Column | Type | Collation | Nullable | Default
  193. -------------+---------+-----------+----------+---------
  194. tgid | bigint | | not null |
  195. tg_receiver | bigint | | not null |
  196. peer_type | text | | |
  197. mxid | text | | |
  198. username | text | | |
  199. title | text | | |
  200. about | text | | |
  201. photo_id | text | | |
  202. megagroup | boolean | | |
  203. config | text | | |
  204. encrypted | boolean | | | false
  205. avatar_url | text | | |
  206. Indexes:
  207. "idx_147168_sqlite_autoindex_portal_1" PRIMARY KEY, btree (tgid, tg_receiver)
  208. "idx_147168_sqlite_autoindex_portal_2" UNIQUE, btree (mxid)
  209. Referenced by:
  210. TABLE "user_portal" CONSTRAINT "user_portal_portal_portal_receiver_fkey" FOREIGN KEY (portal, portal_receiver) REFERENCES portal(tgid, tg_receiver) ON UPDATE CASCADE ON DELETE CASCADE
  211.  
  212. Table "public.puppet"
  213. Column | Type | Collation | Nullable | Default
  214. ---------------------+---------+-----------+----------+---------
  215. id | bigint | | not null |
  216. displayname | text | | |
  217. username | text | | |
  218. photo_id | text | | |
  219. is_bot | boolean | | |
  220. displayname_source | bigint | | |
  221. matrix_registered | boolean | | | false
  222. access_token | text | | |
  223. custom_mxid | text | | |
  224. disable_updates | boolean | | | false
  225. next_batch | text | | |
  226. base_url | text | | |
  227. displayname_contact | boolean | | not null | true
  228. displayname_quality | integer | | not null | 0
  229. Indexes:
  230. "idx_147154_puppet_pkey" PRIMARY KEY, btree (id)
  231. Referenced by:
  232. TABLE "contact" CONSTRAINT "contact_contact_fkey" FOREIGN KEY (contact) REFERENCES puppet(id)
  233.  
  234. Table "public.telegram_file"
  235. Column | Type | Collation | Nullable | Default
  236. -----------------+---------+-----------+----------+-------------
  237. id | text | | not null |
  238. mxc | text | | |
  239. mime_type | text | | |
  240. was_converted | boolean | | |
  241. timestamp | bigint | | | '0'::bigint
  242. size | bigint | | |
  243. width | bigint | | |
  244. height | bigint | | |
  245. thumbnail | text | | |
  246. decryption_info | text | | |
  247. Indexes:
  248. "idx_147126_sqlite_autoindex_telegram_file_1" PRIMARY KEY, btree (id)
  249. Foreign-key constraints:
  250. "telegram_file_thumbnail_fkey" FOREIGN KEY (thumbnail) REFERENCES telegram_file(id)
  251. Referenced by:
  252. TABLE "telegram_file" CONSTRAINT "telegram_file_thumbnail_fkey" FOREIGN KEY (thumbnail) REFERENCES telegram_file(id)
  253.  
  254. Table "public.telethon_entities"
  255. Column | Type | Collation | Nullable | Default
  256. ------------+--------+-----------+----------+---------
  257. session_id | text | | not null |
  258. id | bigint | | not null |
  259. hash | bigint | | |
  260. username | text | | |
  261. phone | bigint | | |
  262. name | text | | |
  263. Indexes:
  264. "idx_147133_sqlite_autoindex_telethon_entities_1" PRIMARY KEY, btree (session_id, id)
  265.  
  266. Table "public.telethon_sent_files"
  267. Column | Type | Collation | Nullable | Default
  268. ------------+--------+-----------+----------+---------
  269. session_id | text | | not null |
  270. md5_digest | bytea | | not null |
  271. file_size | bigint | | not null |
  272. type | bigint | | not null |
  273. id | bigint | | |
  274. hash | bigint | | |
  275. Indexes:
  276. "idx_147117_sqlite_autoindex_telethon_sent_files_1" PRIMARY KEY, btree (session_id, md5_digest, file_size, type)
  277.  
  278. Table "public.telethon_sessions"
  279. Column | Type | Collation | Nullable | Default
  280. ----------------+--------+-----------+----------+---------
  281. session_id | text | | not null |
  282. dc_id | bigint | | not null |
  283. server_address | text | | |
  284. port | bigint | | |
  285. auth_key | bytea | | |
  286. Indexes:
  287. "idx_147111_sqlite_autoindex_telethon_sessions_1" PRIMARY KEY, btree (session_id, dc_id)
  288.  
  289. Table "public.telethon_update_state"
  290. Column | Type | Collation | Nullable | Default
  291. --------------+--------+-----------+----------+---------
  292. session_id | text | | not null |
  293. entity_id | bigint | | not null |
  294. pts | bigint | | |
  295. qts | bigint | | |
  296. date | bigint | | |
  297. seq | bigint | | |
  298. unread_count | bigint | | |
  299. Indexes:
  300. "idx_147139_sqlite_autoindex_telethon_update_state_1" PRIMARY KEY, btree (session_id, entity_id)
  301.  
  302. Table "public.telethon_version"
  303. Column | Type | Collation | Nullable | Default
  304. ---------+--------+-----------+----------+---------
  305. version | bigint | | not null |
  306. Indexes:
  307. "idx_147123_telethon_version_pkey" PRIMARY KEY, btree (version)
  308.  
  309. Table "public.user"
  310. Column | Type | Collation | Nullable | Default
  311. ----------------+--------+-----------+----------+---------
  312. mxid | text | | not null |
  313. tgid | bigint | | |
  314. tg_username | text | | |
  315. saved_contacts | bigint | | |
  316. tg_phone | text | | |
  317. Indexes:
  318. "idx_147096_sqlite_autoindex_user_1" PRIMARY KEY, btree (mxid)
  319. "idx_147096_sqlite_autoindex_user_2" UNIQUE, btree (tgid)
  320.  
  321. Table "public.user_portal"
  322. Column | Type | Collation | Nullable | Default
  323. -----------------+--------+-----------+----------+---------
  324. user | bigint | | |
  325. portal | bigint | | |
  326. portal_receiver | bigint | | |
  327. Indexes:
  328. "idx_147145_sqlite_autoindex_user_portal_1" UNIQUE, btree ("user", portal, portal_receiver)
  329. Foreign-key constraints:
  330. "user_portal_portal_portal_receiver_fkey" FOREIGN KEY (portal, portal_receiver) REFERENCES portal(tgid, tg_receiver) ON UPDATE CASCADE ON DELETE CASCADE
  331.  
  332. Table "public.version"
  333. Column | Type | Collation | Nullable | Default
  334. ---------+---------+-----------+----------+---------
  335. version | integer | | not null |
  336. Indexes:
  337. "version_pkey" PRIMARY KEY, btree (version)
  338.  
  339. Index "public.version_pkey"
  340. Column | Type | Key? | Definition
  341. ---------+---------+------+------------
  342. version | integer | yes | version
  343. primary key, btree, for table "public.version"
Advertisement
Add Comment
Please, Sign In to add comment