main Layout
Generated using DbSchema
Main Layout

Tables
- public._sqlx_migrations
- public.allowed_domains
- public.authorized_users
- public.banned_domains
- public.channel
- public.command_channel
- public.group_permission
- public.guild
- public.guild_member
- public.guild_settings
- public.ignored_channels
- public.log_settings
- public.message
- public.metadata
- public.permission_settings
- public.play_log
- public.playlist
- public.playlist_track
- public.role
- public.shared_playlist
- public.todo
- public.track_reaction
- public.user
- public.user_channel
- public.user_permission
- public.user_role
- public.user_trace
- public.user_votes
- public.vote_webhook
- public.welcome_settings
Table public._sqlx_migrations
| Idx | Name | Data Type |
|---|
| * π | version | bigint |
| * | description | text |
| * | installed_on | timestamptz DEFAULT now() |
| * | success | boolean |
| * | checksum | bytea |
| * | execution_time | bigint |
Indexes
| Type | Name | On |
|---|
| π | _sqlx_migrations_pkey | ON version |
Table public.allowed_domains
| Idx | Name | Data Type |
|---|
| * π β¬ | guild_id | bigint |
| * π | domain | text |
Indexes
| Type | Name | On |
|---|
| π | allowed_domains_pkey | ON guild_id, domain |
Foreign Keys
Table public.authorized_users
| Idx | Name | Data Type |
|---|
| * π β¬ | guild_id | bigint |
| * π | user_id | bigint |
| permissions | bigint |
Indexes
| Type | Name | On |
|---|
| π | authorized_users_pkey | ON guild_id, user_id |
Foreign Keys
Table public.banned_domains
| Idx | Name | Data Type |
|---|
| * π β¬ | guild_id | bigint |
| * π | domain | text |
Indexes
| Type | Name | On |
|---|
| π | banned_domains_pkey | ON guild_id, domain |
Foreign Keys
Table public.channel
| Idx | Name | Data Type |
|---|
| * π β¬ | id | bigint |
| β¬ | guild_id | bigint |
| name | text |
| type | text |
| position | integer |
| created_at | timestamp |
| updated_at | timestamp |
Indexes
| Type | Name | On |
|---|
| π | channel_pkey | ON id |
Foreign Keys
Table public.command_channel
| Idx | Name | Data Type |
|---|
| * π | command | text |
| * π β¬ | guild_id | bigint |
| * π | channel_id | bigint |
| * β¬ | permission_settings_id | bigint |
Indexes
| Type | Name | On |
|---|
| π | command_channel_pkey | ON command, guild_id, channel_id |
Foreign Keys
Table public.group_permission
| Idx | Name | Data Type |
|---|
| * π | id | serial |
| * | group_id | bigint |
| * β¬ | guild_id | bigint |
| * | permission_key | text |
| * | permission_value | integer |
| * | created_at | timestamp DEFAULT CURRENT_TIMESTAMP |
Indexes
| Type | Name | On |
|---|
| π | group_permission_pkey | ON id |
Foreign Keys
Table public.guild
| Idx | Name | Data Type |
|---|
| * π β¬ | id | bigint |
| * | name | text |
| * | created_at | timestamp DEFAULT CURRENT_TIMESTAMP |
| * | updated_at | timestamp DEFAULT CURRENT_TIMESTAMP |
Indexes
| Type | Name | On |
|---|
| π | guild_pkey | ON id |
Table public.guild_member
| Idx | Name | Data Type |
|---|
| * π β¬ | guild_id | bigint |
| * π β¬ | user_id | bigint |
| nick | text |
| joined_at | timestamp |
Indexes
| Type | Name | On |
|---|
| π | guild_member_pkey | ON guild_id, user_id |
Foreign Keys
| Type | Name | On |
|---|
| guild_member_user_id_fkey | ( user_id ) ref public.user (id) |
| fk_guild_member | ( guild_id ) ref public.guild (id) |
Table public.guild_settings
| Idx | Name | Data Type |
|---|
| * π β¬ | guild_id | bigint |
| * | guild_name | text |
| * | prefix | text DEFAULT βr!β::text |
| * | premium | boolean DEFAULT false |
| * | autopause | boolean DEFAULT false |
| * | allow_all_domains | boolean DEFAULT true |
| * | allowed_domains | text[] DEFAULT β{}β::text[] |
| * | banned_domains | text[] DEFAULT β{}β::text[] |
| * | ignored_channels | bigint[] DEFAULT β{}β::bigint[] |
| * | old_volume | double precision DEFAULT 1.0 |
| * | volume | double precision DEFAULT 1.0 |
| * | self_deafen | boolean DEFAULT true |
| * | timeout_seconds | integer DEFAULT 360 |
| * | additional_prefixes | text[] DEFAULT β{}β::text[] |
Indexes
| Type | Name | On |
|---|
| π | guild_settings_pkey | ON guild_id |
Table public.ignored_channels
| Idx | Name | Data Type |
|---|
| * π β¬ | guild_id | bigint |
| * π | channel_id | bigint |
Indexes
| Type | Name | On |
|---|
| π | ignored_channels_pkey | ON guild_id, channel_id |
Foreign Keys
Table public.log_settings
| Idx | Name | Data Type |
|---|
| * π β¬ | guild_id | bigint |
| all_log_channel | bigint |
| raw_event_log_channel | bigint |
| server_log_channel | bigint |
| member_log_channel | bigint |
| join_leave_log_channel | bigint |
| voice_log_channel | bigint |
Indexes
| Type | Name | On |
|---|
| π | log_settings_pkey | ON guild_id |
Foreign Keys
Table public.message
| Idx | Name | Data Type |
|---|
| * π | id | bigint |
| β¬ | channel_id | bigint |
| β¬ | author_id | bigint |
| content | text |
| created_at | timestamp |
| updated_at | timestamp |
Indexes
| Type | Name | On |
|---|
| π | message_pkey | ON id |
Foreign Keys
| Idx | Name | Data Type |
|---|
| * π β¬ | id | serial |
| track | text |
| artist | text |
| album | text |
| date | date |
| channels | smallint |
| channel | text |
| * | start_time | bigint DEFAULT 0 |
| * | duration | bigint DEFAULT 0 |
| sample_rate | integer |
| π | source_url | text |
| title | text |
| thumbnail | text |
Indexes
| Type | Name | On |
|---|
| π | metadata_pkey | ON id |
| π | metadata_track_artist_album_idx | ON source_url |
Table public.permission_settings
| Idx | Name | Data Type |
|---|
| * π β¬ | id | serial |
| * | default_allow_all_commands | boolean |
| * | default_allow_all_users | boolean |
| * | default_allow_all_roles | boolean |
| * | allowed_roles | bigint[] |
| * | denied_roles | bigint[] |
| * | allowed_users | bigint[] |
| * | denied_users | bigint[] |
| * | allowed_channels | bigint[] DEFAULT ARRAY[]::bigint[] |
| * | denied_channels | bigint[] DEFAULT ARRAY[]::bigint[] |
Indexes
| Type | Name | On |
|---|
| π | permission_settings_pkey | ON id |
Table public.play_log
| Idx | Name | Data Type |
|---|
| * π β¬ | id | serial |
| * β¬ | user_id | bigint |
| * β¬ | guild_id | bigint |
| * β¬ | metadata_id | bigint |
| * | created_at | timestamp DEFAULT CURRENT_TIMESTAMP |
Indexes
| Type | Name | On |
|---|
| π | play_log_pkey | ON id |
Foreign Keys
Table public.playlist
| Idx | Name | Data Type |
|---|
| * π β¬ | id | serial |
| * π | name | text |
| π β¬ | user_id | bigint |
| * | privacy | text DEFAULT βprivateβ::text |
Indexes
| Type | Name | On |
|---|
| π | playlist_pkey | ON id |
| π | playlist_name_user_id_idx | ON name, user_id |
Foreign Keys
| Type | Name | On |
|---|
| fk_playlist_user | ( user_id ) ref public.user (id) |
Constraints
| Name | Definition |
|---|
| playlist_privacy_check | (privacy = ANY (ARRAY[βpublicβ::text, βprivateβ::text, βsharedβ::text])) |
Table public.playlist_track
| Idx | Name | Data Type |
|---|
| * π | id | serial |
| * β¬ | playlist_id | integer |
| * β¬ | metadata_id | integer |
| guild_id | bigint |
| channel_id | bigint |
Indexes
| Type | Name | On |
|---|
| π | playlist_track_pkey | ON id |
Foreign Keys
Table public.role
| Idx | Name | Data Type |
|---|
| * π β¬ | id | bigint |
| β¬ | guild_id | bigint |
| name | text |
| color | integer |
| hoist | boolean |
| position | integer |
| permissions | bigint |
| managed | boolean |
| mentionable | boolean |
| created_at | timestamp |
| updated_at | timestamp |
Indexes
| Type | Name | On |
|---|
| π | role_pkey | ON id |
Foreign Keys
Table public.shared_playlist
| Idx | Name | Data Type |
|---|
| * π | id | serial |
| π β¬ | playlist_id | bigint |
| π β¬ | shared_with_user_id | bigint |
Indexes
| Type | Name | On |
|---|
| π | shared_playlist_pkey | ON id |
| π | uq_shared_playlist | ON playlist_id, shared_with_user_id |
Foreign Keys
| Type | Name | On |
|---|
| shared_playlist_shared_with_user_id_fkey | ( shared_with_user_id ) ref public.user (id) |
| shared_playlist_playlist_id_fkey | ( playlist_id ) ref public.playlist (id) |
Table public.todo
| Idx | Name | Data Type |
|---|
| * π | id | serial |
| * β¬ | user_id | bigint |
| * | description | text |
| * | done | boolean DEFAULT false |
| * | creation_date | date DEFAULT CURRENT_DATE |
| done_date | date |
Indexes
| Type | Name | On |
|---|
| π | todo_pkey | ON id |
Foreign Keys
Table public.track_reaction
| Idx | Name | Data Type |
|---|
| * π β¬ | play_log_id | integer |
| * | likes | integer DEFAULT 0 |
| * | dislikes | integer DEFAULT 0 |
| * | skip_votes | integer DEFAULT 0 |
| * | created_at | timestamp DEFAULT CURRENT_TIMESTAMP |
Indexes
| Type | Name | On |
|---|
| π | track_reaction_pkey | ON play_log_id |
Foreign Keys
| Type | Name | On |
|---|
| fk_track_reaction_play_log | ( play_log_id ) ref public.play_log (id) |
Table public.user
| Idx | Name | Data Type |
|---|
| * π β¬ | id | bigint |
| * | username | text |
| discriminator | smallint |
| * | avatar_url | text DEFAULT β::text |
| * | bot | boolean |
| * | created_at | timestamp |
| * | updated_at | timestamp |
| * | last_seen | timestamp |
Indexes
| Type | Name | On |
|---|
| π | user_pkey | ON id |
Table public.user_channel
| Idx | Name | Data Type |
|---|
| * π β¬ | user_id | bigint |
| * π β¬ | channel_id | bigint |
Indexes
| Type | Name | On |
|---|
| π | user_channel_pkey | ON user_id, channel_id |
Foreign Keys
Table public.user_permission
| Idx | Name | Data Type |
|---|
| * π | id | serial |
| * β¬ | user_id | bigint |
| * β¬ | guild_id | bigint |
| * | permission_key | text |
| * | permission_value | integer |
| * | created_at | timestamp DEFAULT CURRENT_TIMESTAMP |
Indexes
| Type | Name | On |
|---|
| π | user_permission_pkey | ON id |
Foreign Keys
| Type | Name | On |
|---|
| user_permission_guild_id_fkey | ( guild_id ) ref public.guild (id) |
| fk_user_guild_id | ( user_id ) ref public.user (id) |
Table public.user_role
| Idx | Name | Data Type |
|---|
| * π β¬ | user_id | bigint |
| * π β¬ | role_id | bigint |
Indexes
| Type | Name | On |
|---|
| π | user_role_pkey | ON user_id, role_id |
Foreign Keys
Table public.user_trace
| Idx | Name | Data Type |
|---|
| * π | user_id | bigint |
| * π | ts | timestamp |
| whence | text |
Indexes
| Type | Name | On |
|---|
| π | user_trace_pkey | ON user_id, ts |
Table public.user_votes
| Idx | Name | Data Type |
|---|
| * π | id | serial |
| * π β¬ | user_id | bigint |
| * π | timestamp | timestamp |
| * π | site | text |
Indexes
| Type | Name | On |
|---|
| π | user_votes_pkey | ON id |
| π | user_votes_user_id_idx | ON user_id, timestamp, site |
Foreign Keys
| Type | Name | On |
|---|
| crack_voting_user_id_fkey | ( user_id ) ref public.user (id) |
Table public.vote_webhook
| Idx | Name | Data Type |
|---|
| * π | id | serial |
| * | bot_id | bigint |
| * β¬ | user_id | bigint |
| * | kind | webhook_kind |
| * | is_weekend | boolean |
| query | text |
| * | created_at | timestamp DEFAULT CURRENT_TIMESTAMP |
Indexes
| Type | Name | On |
|---|
| π | vote_webhook_pkey | ON id |
Foreign Keys
| Type | Name | On |
|---|
| fk_vote_webhook_user_id | ( user_id ) ref public.user (id) |
Table public.welcome_settings
| Idx | Name | Data Type |
|---|
| * π β¬ | guild_id | bigint |
| channel_id | bigint |
| message | text |
| auto_role | bigint |
Indexes
| Type | Name | On |
|---|
| π | welcome_settings_pkey | ON guild_id |
Foreign Keys