Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- matrix_mautrix_telegram=# \d public.*
- Table "public.alembic_version"
- Column | Type | Collation | Nullable | Default
- -------------+------+-----------+----------+---------
- version_num | text | | not null |
- Indexes:
- "idx_147090_sqlite_autoindex_alembic_version_1" PRIMARY KEY, btree (version_num)
- Table "public.bot_chat"
- Column | Type | Collation | Nullable | Default
- --------+--------+-----------+----------+---------
- id | bigint | | not null |
- type | text | | |
- Indexes:
- "idx_147105_bot_chat_pkey" PRIMARY KEY, btree (id)
- Table "public.contact"
- Column | Type | Collation | Nullable | Default
- ---------+--------+-----------+----------+---------
- user | bigint | | |
- contact | bigint | | |
- Indexes:
- "idx_147102_sqlite_autoindex_contact_1" UNIQUE, btree ("user", contact)
- Foreign-key constraints:
- "contact_contact_fkey" FOREIGN KEY (contact) REFERENCES puppet(id)
- Index "public.idx_147090_sqlite_autoindex_alembic_version_1"
- Column | Type | Key? | Definition
- -------------+------+------+-------------
- version_num | text | yes | version_num
- primary key, btree, for table "public.alembic_version"
- Index "public.idx_147096_sqlite_autoindex_user_1"
- Column | Type | Key? | Definition
- --------+------+------+------------
- mxid | text | yes | mxid
- primary key, btree, for table "public.user"
- Index "public.idx_147096_sqlite_autoindex_user_2"
- Column | Type | Key? | Definition
- --------+--------+------+------------
- tgid | bigint | yes | tgid
- unique, btree, for table "public.user"
- Index "public.idx_147102_sqlite_autoindex_contact_1"
- Column | Type | Key? | Definition
- ---------+--------+------+------------
- user | bigint | yes | "user"
- contact | bigint | yes | contact
- unique, btree, for table "public.contact"
- Index "public.idx_147105_bot_chat_pkey"
- Column | Type | Key? | Definition
- --------+--------+------+------------
- id | bigint | yes | id
- primary key, btree, for table "public.bot_chat"
- Index "public.idx_147111_sqlite_autoindex_telethon_sessions_1"
- Column | Type | Key? | Definition
- ------------+--------+------+------------
- session_id | text | yes | session_id
- dc_id | bigint | yes | dc_id
- primary key, btree, for table "public.telethon_sessions"
- Index "public.idx_147117_sqlite_autoindex_telethon_sent_files_1"
- Column | Type | Key? | Definition
- ------------+--------+------+------------
- session_id | text | yes | session_id
- md5_digest | bytea | yes | md5_digest
- file_size | bigint | yes | file_size
- type | bigint | yes | type
- primary key, btree, for table "public.telethon_sent_files"
- Index "public.idx_147123_telethon_version_pkey"
- Column | Type | Key? | Definition
- ---------+--------+------+------------
- version | bigint | yes | version
- primary key, btree, for table "public.telethon_version"
- Index "public.idx_147126_sqlite_autoindex_telegram_file_1"
- Column | Type | Key? | Definition
- --------+------+------+------------
- id | text | yes | id
- primary key, btree, for table "public.telegram_file"
- Index "public.idx_147133_sqlite_autoindex_telethon_entities_1"
- Column | Type | Key? | Definition
- ------------+--------+------+------------
- session_id | text | yes | session_id
- id | bigint | yes | id
- primary key, btree, for table "public.telethon_entities"
- Index "public.idx_147139_sqlite_autoindex_telethon_update_state_1"
- Column | Type | Key? | Definition
- ------------+--------+------+------------
- session_id | text | yes | session_id
- entity_id | bigint | yes | entity_id
- primary key, btree, for table "public.telethon_update_state"
- Index "public.idx_147145_sqlite_autoindex_user_portal_1"
- Column | Type | Key? | Definition
- -----------------+--------+------+-----------------
- user | bigint | yes | "user"
- portal | bigint | yes | portal
- portal_receiver | bigint | yes | portal_receiver
- unique, btree, for table "public.user_portal"
- Index "public.idx_147148_sqlite_autoindex_mx_user_profile_1"
- Column | Type | Key? | Definition
- ---------+------+------+------------
- room_id | text | yes | room_id
- user_id | text | yes | user_id
- primary key, btree, for table "public.mx_user_profile"
- Index "public.idx_147154_puppet_pkey"
- Column | Type | Key? | Definition
- --------+--------+------+------------
- id | bigint | yes | id
- primary key, btree, for table "public.puppet"
- Index "public.idx_147162_sqlite_autoindex_message_1"
- Column | Type | Key? | Definition
- ------------+--------+------+------------
- tgid | bigint | yes | tgid
- tg_space | bigint | yes | tg_space
- edit_index | bigint | yes | edit_index
- primary key, btree, for table "public.message"
- Index "public.idx_147162_sqlite_autoindex_message_2"
- Column | Type | Key? | Definition
- ----------+--------+------+------------
- mxid | text | yes | mxid
- mx_room | text | yes | mx_room
- tg_space | bigint | yes | tg_space
- unique, btree, for table "public.message"
- Index "public.idx_147168_sqlite_autoindex_portal_1"
- Column | Type | Key? | Definition
- -------------+--------+------+-------------
- tgid | bigint | yes | tgid
- tg_receiver | bigint | yes | tg_receiver
- primary key, btree, for table "public.portal"
- Index "public.idx_147168_sqlite_autoindex_portal_2"
- Column | Type | Key? | Definition
- --------+------+------+------------
- mxid | text | yes | mxid
- unique, btree, for table "public.portal"
- Index "public.idx_147175_sqlite_autoindex_mx_room_state_1"
- Column | Type | Key? | Definition
- ---------+------+------+------------
- room_id | text | yes | room_id
- primary key, btree, for table "public.mx_room_state"
- Table "public.message"
- Column | Type | Collation | Nullable | Default
- ------------+---------+-----------+----------+---------
- mxid | text | | |
- mx_room | text | | |
- tgid | bigint | | not null |
- tg_space | bigint | | not null |
- edit_index | bigint | | not null |
- redacted | boolean | | | false
- Indexes:
- "idx_147162_sqlite_autoindex_message_1" PRIMARY KEY, btree (tgid, tg_space, edit_index)
- "idx_147162_sqlite_autoindex_message_2" UNIQUE, btree (mxid, mx_room, tg_space)
- Table "public.mx_room_state"
- Column | Type | Collation | Nullable | Default
- ----------------------+---------+-----------+----------+---------
- room_id | text | | not null |
- power_levels | text | | |
- encryption | text | | |
- has_full_member_list | boolean | | |
- is_encrypted | boolean | | |
- Indexes:
- "idx_147175_sqlite_autoindex_mx_room_state_1" PRIMARY KEY, btree (room_id)
- Table "public.mx_user_profile"
- Column | Type | Collation | Nullable | Default
- -------------+------+-----------+----------+---------
- room_id | text | | not null |
- user_id | text | | not null |
- membership | text | | |
- displayname | text | | |
- avatar_url | text | | |
- Indexes:
- "idx_147148_sqlite_autoindex_mx_user_profile_1" PRIMARY KEY, btree (room_id, user_id)
- Table "public.portal"
- Column | Type | Collation | Nullable | Default
- -------------+---------+-----------+----------+---------
- tgid | bigint | | not null |
- tg_receiver | bigint | | not null |
- peer_type | text | | |
- mxid | text | | |
- username | text | | |
- title | text | | |
- about | text | | |
- photo_id | text | | |
- megagroup | boolean | | |
- config | text | | |
- encrypted | boolean | | | false
- avatar_url | text | | |
- Indexes:
- "idx_147168_sqlite_autoindex_portal_1" PRIMARY KEY, btree (tgid, tg_receiver)
- "idx_147168_sqlite_autoindex_portal_2" UNIQUE, btree (mxid)
- Referenced by:
- 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
- Table "public.puppet"
- Column | Type | Collation | Nullable | Default
- ---------------------+---------+-----------+----------+---------
- id | bigint | | not null |
- displayname | text | | |
- username | text | | |
- photo_id | text | | |
- is_bot | boolean | | |
- displayname_source | bigint | | |
- matrix_registered | boolean | | | false
- access_token | text | | |
- custom_mxid | text | | |
- disable_updates | boolean | | | false
- next_batch | text | | |
- base_url | text | | |
- displayname_contact | boolean | | not null | true
- displayname_quality | integer | | not null | 0
- Indexes:
- "idx_147154_puppet_pkey" PRIMARY KEY, btree (id)
- Referenced by:
- TABLE "contact" CONSTRAINT "contact_contact_fkey" FOREIGN KEY (contact) REFERENCES puppet(id)
- Table "public.telegram_file"
- Column | Type | Collation | Nullable | Default
- -----------------+---------+-----------+----------+-------------
- id | text | | not null |
- mxc | text | | |
- mime_type | text | | |
- was_converted | boolean | | |
- timestamp | bigint | | | '0'::bigint
- size | bigint | | |
- width | bigint | | |
- height | bigint | | |
- thumbnail | text | | |
- decryption_info | text | | |
- Indexes:
- "idx_147126_sqlite_autoindex_telegram_file_1" PRIMARY KEY, btree (id)
- Foreign-key constraints:
- "telegram_file_thumbnail_fkey" FOREIGN KEY (thumbnail) REFERENCES telegram_file(id)
- Referenced by:
- TABLE "telegram_file" CONSTRAINT "telegram_file_thumbnail_fkey" FOREIGN KEY (thumbnail) REFERENCES telegram_file(id)
- Table "public.telethon_entities"
- Column | Type | Collation | Nullable | Default
- ------------+--------+-----------+----------+---------
- session_id | text | | not null |
- id | bigint | | not null |
- hash | bigint | | |
- username | text | | |
- phone | bigint | | |
- name | text | | |
- Indexes:
- "idx_147133_sqlite_autoindex_telethon_entities_1" PRIMARY KEY, btree (session_id, id)
- Table "public.telethon_sent_files"
- Column | Type | Collation | Nullable | Default
- ------------+--------+-----------+----------+---------
- session_id | text | | not null |
- md5_digest | bytea | | not null |
- file_size | bigint | | not null |
- type | bigint | | not null |
- id | bigint | | |
- hash | bigint | | |
- Indexes:
- "idx_147117_sqlite_autoindex_telethon_sent_files_1" PRIMARY KEY, btree (session_id, md5_digest, file_size, type)
- Table "public.telethon_sessions"
- Column | Type | Collation | Nullable | Default
- ----------------+--------+-----------+----------+---------
- session_id | text | | not null |
- dc_id | bigint | | not null |
- server_address | text | | |
- port | bigint | | |
- auth_key | bytea | | |
- Indexes:
- "idx_147111_sqlite_autoindex_telethon_sessions_1" PRIMARY KEY, btree (session_id, dc_id)
- Table "public.telethon_update_state"
- Column | Type | Collation | Nullable | Default
- --------------+--------+-----------+----------+---------
- session_id | text | | not null |
- entity_id | bigint | | not null |
- pts | bigint | | |
- qts | bigint | | |
- date | bigint | | |
- seq | bigint | | |
- unread_count | bigint | | |
- Indexes:
- "idx_147139_sqlite_autoindex_telethon_update_state_1" PRIMARY KEY, btree (session_id, entity_id)
- Table "public.telethon_version"
- Column | Type | Collation | Nullable | Default
- ---------+--------+-----------+----------+---------
- version | bigint | | not null |
- Indexes:
- "idx_147123_telethon_version_pkey" PRIMARY KEY, btree (version)
- Table "public.user"
- Column | Type | Collation | Nullable | Default
- ----------------+--------+-----------+----------+---------
- mxid | text | | not null |
- tgid | bigint | | |
- tg_username | text | | |
- saved_contacts | bigint | | |
- tg_phone | text | | |
- Indexes:
- "idx_147096_sqlite_autoindex_user_1" PRIMARY KEY, btree (mxid)
- "idx_147096_sqlite_autoindex_user_2" UNIQUE, btree (tgid)
- Table "public.user_portal"
- Column | Type | Collation | Nullable | Default
- -----------------+--------+-----------+----------+---------
- user | bigint | | |
- portal | bigint | | |
- portal_receiver | bigint | | |
- Indexes:
- "idx_147145_sqlite_autoindex_user_portal_1" UNIQUE, btree ("user", portal, portal_receiver)
- Foreign-key constraints:
- "user_portal_portal_portal_receiver_fkey" FOREIGN KEY (portal, portal_receiver) REFERENCES portal(tgid, tg_receiver) ON UPDATE CASCADE ON DELETE CASCADE
- Table "public.version"
- Column | Type | Collation | Nullable | Default
- ---------+---------+-----------+----------+---------
- version | integer | | not null |
- Indexes:
- "version_pkey" PRIMARY KEY, btree (version)
- Index "public.version_pkey"
- Column | Type | Key? | Definition
- ---------+---------+------+------------
- version | integer | yes | version
- primary key, btree, for table "public.version"
Advertisement
Add Comment
Please, Sign In to add comment