Account
-
Table name: accounts
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
username |
string |
character varying |
false |
|||||
domain |
string |
character varying |
true |
|||||
private_key |
text |
text |
true |
|||||
public_key |
text |
text |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
note |
text |
text |
false |
|||||
display_name |
string |
character varying |
false |
|||||
uri |
string |
character varying |
false |
|||||
url |
string |
character varying |
true |
|||||
avatar_file_name |
string |
character varying |
true |
|||||
avatar_content_type |
string |
character varying |
true |
|||||
avatar_file_size |
integer |
integer |
true |
4 |
||||
avatar_updated_at |
datetime |
timestamp without time zone |
true |
|||||
header_file_name |
string |
character varying |
true |
|||||
header_content_type |
string |
character varying |
true |
|||||
header_file_size |
integer |
integer |
true |
4 |
||||
header_updated_at |
datetime |
timestamp without time zone |
true |
|||||
avatar_remote_url |
string |
character varying |
true |
|||||
locked |
boolean |
boolean |
false |
false |
||||
header_remote_url |
string |
character varying |
false |
|||||
last_webfingered_at |
datetime |
timestamp without time zone |
true |
|||||
inbox_url |
string |
character varying |
false |
|||||
outbox_url |
string |
character varying |
false |
|||||
shared_inbox_url |
string |
character varying |
false |
|||||
followers_url |
string |
character varying |
false |
|||||
protocol |
integer |
integer |
0 |
false |
4 |
|||
memorial |
boolean |
boolean |
false |
false |
||||
moved_to_account_id |
integer |
bigint |
true |
8 |
||||
featured_collection_url |
string |
character varying |
true |
|||||
fields |
jsonb |
jsonb |
true |
|||||
actor_type |
string |
character varying |
true |
|||||
discoverable |
boolean |
boolean |
true |
|||||
also_known_as |
string |
character varying |
true |
|||||
silenced_at |
datetime |
timestamp without time zone |
true |
|||||
suspended_at |
datetime |
timestamp without time zone |
true |
|||||
hide_collections |
boolean |
boolean |
true |
|||||
avatar_storage_schema_version |
integer |
integer |
true |
4 |
||||
header_storage_schema_version |
integer |
integer |
true |
4 |
||||
devices_url |
string |
character varying |
true |
|||||
suspension_origin |
integer |
integer |
true |
4 |
||||
sensitized_at |
datetime |
timestamp without time zone |
true |
|||||
trendable |
boolean |
boolean |
true |
|||||
reviewed_at |
datetime |
timestamp without time zone |
true |
|||||
requested_review_at |
datetime |
timestamp without time zone |
true |
|||||
indexable |
boolean |
boolean |
false |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_accounts_on_domain_and_id |
["domain", "id"] |
false |
btree |
index_accounts_on_moved_to_account_id |
["moved_to_account_id"] |
false |
btree |
index_accounts_on_uri |
["uri"] |
false |
btree |
index_accounts_on_url |
["url"] |
false |
btree |
index_accounts_on_username_and_domain_lower |
lower((username)::text), COALESCE(lower((domain)::text), ''::text) |
true |
btree |
search_index |
(setweight(to_tsvector('simple'::regconfig, (display_name)::text), 'A'::"char") || setweight(to_tsvector('simple'::regconfig, (username)::text), 'B'::"char" || setweight(to_tsvector('simple'::regconfig, (COALESCE(domain, ''::character varying))::text), 'C'::"char"))) |
false |
gin |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
moved_to_account_id |
{:class_name⇒"Account", :optional⇒true} |
macro | name | options |
---|---|---|
has_one |
{:inverse_of⇒"account", :dependent⇒"destroy"} |
|
has_many |
{:dependent⇒"destroy", :inverse_of⇒"account"} |
|
has_many |
{:inverse_of⇒"account", :dependent⇒"destroy"} |
|
has_many |
{:inverse_of⇒"account", :dependent⇒"destroy"} |
|
has_many |
{:inverse_of⇒"account", :dependent⇒"destroy"} |
|
has_many |
{:inverse_of⇒"account", :dependent⇒"destroy"} |
|
has_many |
{:class_name⇒"AccountConversation", :dependent⇒"destroy", :inverse_of⇒"account"} |
|
has_many |
{:inverse_of⇒"account", :dependent⇒"destroy"} |
|
has_many |
{:inverse_of⇒"account", :dependent⇒"destroy"} |
|
has_one |
{:inverse_of⇒"account", :dependent⇒"destroy"} |
|
has_many |
{:inverse_of⇒"account", :dependent⇒"destroy"} |
|
has_many |
{:inverse_of⇒"account", :dependent⇒"destroy"} |
|
has_many |
{:inverse_of⇒"account", :dependent⇒"destroy"} |
|
has_many |
{:through⇒"status_pins", :class_name⇒"Status", :source⇒"status"} |
|
has_many |
{:inverse_of⇒"account", :dependent⇒"destroy"} |
|
has_many |
{:through⇒"account_pins", :class_name⇒"Account", :source⇒"target_account"} |
|
has_many |
{:dependent⇒"destroy"} |
|
has_many |
{:dependent⇒"destroy"} |
|
has_many |
{:dependent⇒"destroy", :inverse_of⇒"account"} |
|
has_many |
{:class_name⇒"Report", :foreign_key⇒"target_account_id", :dependent⇒"destroy", :inverse_of⇒"target_account"} |
|
has_many |
{:dependent⇒"destroy"} |
|
has_many |
{:inverse_of⇒"account", :dependent⇒"destroy"} |
|
has_many |
{:dependent⇒"destroy", :inverse_of⇒"account"} |
|
has_many |
{:class_name⇒"AccountModerationNote", :foreign_key⇒"target_account_id", :dependent⇒"destroy", :inverse_of⇒"target_account"} |
|
has_many |
{:dependent⇒"destroy", :inverse_of⇒"account"} |
|
has_many |
{:class_name⇒"AccountWarning", :foreign_key⇒"target_account_id", :dependent⇒"destroy", :inverse_of⇒"target_account"} |
|
has_many |
{:inverse_of⇒"account", :dependent⇒"destroy"} |
|
has_many |
{:through⇒"list_accounts"} |
|
has_many |
{:class_name⇒"List", :dependent⇒"destroy", :inverse_of⇒"account"} |
|
has_many |
{:class_name⇒"AccountMigration", :dependent⇒"destroy", :inverse_of⇒"account"} |
|
has_many |
{:class_name⇒"AccountAlias", :dependent⇒"destroy", :inverse_of⇒"account"} |
|
has_and_belongs_to_many |
{} |
|
has_many |
{:dependent⇒"destroy", :inverse_of⇒"account"} |
|
has_one |
{:class_name⇒"AccountDeletionRequest", :inverse_of⇒"account", :dependent⇒"destroy"} |
|
has_one |
{:inverse_of⇒"account", :dependent⇒nil} |
|
has_one |
{:inverse_of⇒"account", :dependent⇒"destroy"} |
|
has_one |
{:class_name⇒"AccountStatusesCleanupPolicy", :inverse_of⇒"account", :dependent⇒"destroy"} |
|
has_many |
{:inverse_of⇒"account", :dependent⇒"delete_all"} |
|
has_one |
{:inverse_of⇒"account", :dependent⇒nil} |
|
has_many |
{:dependent⇒"destroy"} |
|
has_many |
{:class_name⇒"Follow", :dependent⇒"destroy", :foreign_key⇒"account_id", :inverse_of⇒"account"} |
|
has_many |
{:class_name⇒"Follow", :dependent⇒"destroy", :foreign_key⇒"target_account_id", :inverse_of⇒"target_account"} |
|
has_many |
{:through⇒"active_relationships", :source⇒"target_account"} |
|
has_many |
{:through⇒"passive_relationships", :source⇒"account"} |
|
has_many |
{:class_name⇒"SeveredRelationship", :dependent⇒"destroy", :foreign_key⇒"local_account_id", :inverse_of⇒"local_account"} |
|
has_many |
{:class_name⇒"SeveredRelationship", :dependent⇒"destroy", :foreign_key⇒"remote_account_id", :inverse_of⇒"remote_account"} |
|
has_many |
{:dependent⇒"destroy"} |
|
has_many |
{:class_name⇒"Block", :dependent⇒"destroy", :foreign_key⇒"account_id", :inverse_of⇒"account"} |
|
has_many |
{:class_name⇒"Block", :dependent⇒"destroy", :foreign_key⇒"target_account_id", :inverse_of⇒"target_account"} |
|
has_many |
{:through⇒"block_relationships", :source⇒"target_account"} |
|
has_many |
{:through⇒"blocked_by_relationships", :source⇒"account"} |
|
has_many |
{:class_name⇒"Mute", :dependent⇒"destroy", :foreign_key⇒"account_id", :inverse_of⇒"account"} |
|
has_many |
{:class_name⇒"Mute", :dependent⇒"destroy", :foreign_key⇒"target_account_id", :inverse_of⇒"target_account"} |
|
has_many |
{:through⇒"mute_relationships", :source⇒"target_account"} |
|
has_many |
{:through⇒"muted_by_relationships", :source⇒"account"} |
|
has_many |
{:dependent⇒"destroy"} |
|
has_many |
{:class_name⇒"AccountDomainBlock", :dependent⇒"destroy"} |
|
has_many |
{:dependent⇒"destroy"} |
AccountAlias
-
Table name: account_aliases
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
true |
8 |
||||
acct |
string |
character varying |
false |
|||||
uri |
string |
character varying |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_account_aliases_on_account_id |
["account_id"] |
false |
btree |
index_account_aliases_on_account_id_and_uri |
["account_id", "uri"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
AccountConversation
-
Table name: account_conversations
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
true |
8 |
||||
conversation_id |
integer |
bigint |
true |
8 |
||||
participant_account_ids |
integer |
bigint |
{} |
false |
8 |
|||
status_ids |
integer |
bigint |
{} |
false |
8 |
|||
last_status_id |
integer |
bigint |
true |
8 |
||||
lock_version |
integer |
integer |
0 |
false |
4 |
|||
unread |
boolean |
boolean |
false |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_account_conversations_on_conversation_id |
["conversation_id"] |
false |
btree |
index_unique_conversations |
["account_id", "conversation_id", "participant_account_ids"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
conversation_id |
{} |
|
belongs_to |
last_status_id |
{:class_name⇒"Status"} |
AccountDeletionRequest
-
Table name: account_deletion_requests
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
true |
8 |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_account_deletion_requests_on_account_id |
["account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
AccountDomainBlock
-
Table name: account_domain_blocks
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
domain |
string |
character varying |
true |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
account_id |
integer |
bigint |
true |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_account_domain_blocks_on_account_id_and_domain |
["account_id", "domain"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
AccountMigration
-
Table name: account_migrations
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
true |
8 |
||||
acct |
string |
character varying |
false |
|||||
followers_count |
integer |
bigint |
0 |
false |
8 |
|||
target_account_id |
integer |
bigint |
true |
8 |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_account_migrations_on_account_id |
["account_id"] |
false |
btree |
index_account_migrations_on_target_account_id |
["target_account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
target_account_id |
{:class_name⇒"Account"} |
AccountModerationNote
-
Table name: account_moderation_notes
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
content |
text |
text |
false |
|||||
account_id |
integer |
bigint |
false |
8 |
||||
target_account_id |
integer |
bigint |
false |
8 |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_account_moderation_notes_on_account_id |
["account_id"] |
false |
btree |
index_account_moderation_notes_on_target_account_id |
["target_account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
target_account_id |
{:class_name⇒"Account"} |
AccountNote
-
Table name: account_notes
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
true |
8 |
||||
target_account_id |
integer |
bigint |
true |
8 |
||||
comment |
text |
text |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_account_notes_on_account_id_and_target_account_id |
["account_id", "target_account_id"] |
true |
btree |
index_account_notes_on_target_account_id |
["target_account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
target_account_id |
{:class_name⇒"Account"} |
AccountPin
-
Table name: account_pins
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
true |
8 |
||||
target_account_id |
integer |
bigint |
true |
8 |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_account_pins_on_account_id_and_target_account_id |
["account_id", "target_account_id"] |
true |
btree |
index_account_pins_on_target_account_id |
["target_account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
target_account_id |
{:class_name⇒"Account"} |
AccountRelationshipSeveranceEvent
-
Table name: account_relationship_severance_events
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
||||
relationship_severance_event_id |
integer |
bigint |
false |
8 |
||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
followers_count |
integer |
integer |
0 |
false |
4 |
|||
following_count |
integer |
integer |
0 |
false |
4 |
Indexes
name | columns | unique | using |
---|---|---|---|
idx_on_account_id_relationship_severance_event_id_7bd82bf20e |
["account_id", "relationship_severance_event_id"] |
true |
btree |
idx_on_relationship_severance_event_id_403f53e707 |
["relationship_severance_event_id"] |
false |
btree |
index_account_relationship_severance_events_on_account_id |
["account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
relationship_severance_event_id |
{} |
macro | name | options |
---|---|---|
has_many |
{:through⇒"relationship_severance_event"} |
AccountStat
-
Table name: account_stats
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
||||
statuses_count |
integer |
bigint |
0 |
false |
8 |
|||
following_count |
integer |
bigint |
0 |
false |
8 |
|||
followers_count |
integer |
bigint |
0 |
false |
8 |
|||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
last_status_at |
datetime |
timestamp without time zone |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_account_stats_on_account_id |
["account_id"] |
true |
btree |
index_account_stats_on_last_status_at_and_account_id |
["last_status_at", "account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{:inverse_of⇒"account_stat"} |
AccountStatusesCleanupPolicy
-
Table name: account_statuses_cleanup_policies
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
||||
enabled |
boolean |
boolean |
true |
false |
||||
min_status_age |
integer |
integer |
1209600 |
false |
4 |
|||
keep_direct |
boolean |
boolean |
true |
false |
||||
keep_pinned |
boolean |
boolean |
true |
false |
||||
keep_polls |
boolean |
boolean |
false |
false |
||||
keep_media |
boolean |
boolean |
false |
false |
||||
keep_self_fav |
boolean |
boolean |
true |
false |
||||
keep_self_bookmark |
boolean |
boolean |
true |
false |
||||
min_favs |
integer |
integer |
true |
4 |
||||
min_reblogs |
integer |
integer |
true |
4 |
||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_account_statuses_cleanup_policies_on_account_id |
["account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
AccountSummary
-
Table name: account_summaries
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
account_id |
integer |
bigint |
true |
8 |
||||
language |
string |
character varying |
true |
|||||
sensitive |
boolean |
boolean |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
idx_on_account_id_language_sensitive_250461e1eb |
["account_id", "language", "sensitive"] |
false |
btree |
index_account_summaries_on_account_id |
["account_id"] |
true |
btree |
Associations
macro | name | options |
---|---|---|
has_many |
{:primary_key⇒"account_id", :foreign_key⇒"account_id", :inverse_of⇒false, :dependent⇒nil} |
AccountWarning
-
Table name: account_warnings
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
true |
8 |
||||
target_account_id |
integer |
bigint |
true |
8 |
||||
action |
integer |
integer |
0 |
false |
4 |
|||
text |
text |
text |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
report_id |
integer |
bigint |
true |
8 |
||||
status_ids |
string |
character varying |
true |
|||||
overruled_at |
datetime |
timestamp without time zone |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_account_warnings_on_account_id |
["account_id"] |
false |
btree |
index_account_warnings_on_target_account_id |
["target_account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{:inverse_of⇒"account_warnings"} |
|
belongs_to |
target_account_id |
{:class_name⇒"Account", :inverse_of⇒"strikes"} |
|
belongs_to |
report_id |
{:optional⇒true} |
macro | name | options |
---|---|---|
has_one |
{:dependent⇒"destroy", :inverse_of⇒"strike"} |
AccountWarningPreset
-
Table name: account_warning_presets
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
text |
text |
text |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
title |
string |
character varying |
false |
Indexes
None
Associations
None
Admin::ActionLog
-
Table name: admin_action_logs
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
true |
8 |
||||
action |
string |
character varying |
false |
|||||
target_type |
string |
character varying |
true |
|||||
target_id |
integer |
bigint |
true |
8 |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
human_identifier |
string |
character varying |
true |
|||||
route_param |
string |
character varying |
true |
|||||
permalink |
string |
character varying |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_admin_action_logs_on_account_id |
["account_id"] |
false |
btree |
index_admin_action_logs_on_target_type_and_target_id |
["target_type", "target_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
target |
target_id |
{:polymorphic⇒true, :optional⇒true} |
Announcement
-
Table name: announcements
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
text |
text |
text |
false |
|||||
published |
boolean |
boolean |
false |
false |
||||
all_day |
boolean |
boolean |
false |
false |
||||
scheduled_at |
datetime |
timestamp without time zone |
true |
|||||
starts_at |
datetime |
timestamp without time zone |
true |
|||||
ends_at |
datetime |
timestamp without time zone |
true |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
published_at |
datetime |
timestamp without time zone |
true |
|||||
status_ids |
integer |
bigint |
true |
8 |
Indexes
None
Associations
macro | name | options |
---|---|---|
has_many |
{:dependent⇒"destroy"} |
|
has_many |
{:dependent⇒"destroy"} |
AnnouncementMute
-
Table name: announcement_mutes
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
true |
8 |
||||
announcement_id |
integer |
bigint |
true |
8 |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_announcement_mutes_on_account_id_and_announcement_id |
["account_id", "announcement_id"] |
true |
btree |
index_announcement_mutes_on_announcement_id |
["announcement_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
announcement_id |
{:inverse_of⇒"announcement_mutes"} |
AnnouncementReaction
-
Table name: announcement_reactions
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
true |
8 |
||||
announcement_id |
integer |
bigint |
true |
8 |
||||
name |
string |
character varying |
false |
|||||
custom_emoji_id |
integer |
bigint |
true |
8 |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_announcement_reactions_on_account_id_and_announcement_id |
["account_id", "announcement_id", "name"] |
true |
btree |
index_announcement_reactions_on_announcement_id |
["announcement_id"] |
false |
btree |
index_announcement_reactions_on_custom_emoji_id |
["custom_emoji_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
announcement_id |
{:inverse_of⇒"announcement_reactions"} |
|
belongs_to |
custom_emoji_id |
{:optional⇒true} |
Appeal
-
Table name: appeals
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
||||
account_warning_id |
integer |
bigint |
false |
8 |
||||
text |
text |
text |
false |
|||||
approved_at |
datetime |
timestamp without time zone |
true |
|||||
approved_by_account_id |
integer |
bigint |
true |
8 |
||||
rejected_at |
datetime |
timestamp without time zone |
true |
|||||
rejected_by_account_id |
integer |
bigint |
true |
8 |
||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_appeals_on_account_id |
["account_id"] |
false |
btree |
index_appeals_on_account_warning_id |
["account_warning_id"] |
true |
btree |
index_appeals_on_approved_by_account_id |
["approved_by_account_id"] |
false |
btree |
index_appeals_on_rejected_by_account_id |
["rejected_by_account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
account_warning_id |
{:class_name⇒"AccountWarning", :foreign_key⇒"account_warning_id", :inverse_of⇒"appeal"} |
|
belongs_to |
approved_by_account_id |
{:class_name⇒"Account", :optional⇒true} |
|
belongs_to |
rejected_by_account_id |
{:class_name⇒"Account", :optional⇒true} |
Backup
-
Table name: backups
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
user_id |
integer |
bigint |
true |
8 |
||||
dump_file_name |
string |
character varying |
true |
|||||
dump_content_type |
string |
character varying |
true |
|||||
dump_updated_at |
datetime |
timestamp without time zone |
true |
|||||
processed |
boolean |
boolean |
false |
false |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
dump_file_size |
integer |
bigint |
true |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_backups_on_user_id |
["user_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
user_id |
{:inverse_of⇒"backups"} |
Block
-
Table name: blocks
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
account_id |
integer |
bigint |
false |
8 |
||||
target_account_id |
integer |
bigint |
false |
8 |
||||
uri |
string |
character varying |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_blocks_on_account_id_and_target_account_id |
["account_id", "target_account_id"] |
true |
btree |
index_blocks_on_target_account_id |
["target_account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
target_account_id |
{:class_name⇒"Account"} |
Bookmark
-
Table name: bookmarks
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
||||
status_id |
integer |
bigint |
false |
8 |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_bookmarks_on_account_id_and_status_id |
["account_id", "status_id"] |
true |
btree |
index_bookmarks_on_status_id |
["status_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{:inverse_of⇒"bookmarks"} |
|
belongs_to |
status_id |
{:inverse_of⇒"bookmarks"} |
BulkImport
-
Table name: bulk_imports
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
type |
integer |
integer |
false |
4 |
||||
state |
integer |
integer |
false |
4 |
||||
total_items |
integer |
integer |
0 |
false |
4 |
|||
imported_items |
integer |
integer |
0 |
false |
4 |
|||
processed_items |
integer |
integer |
0 |
false |
4 |
|||
finished_at |
datetime |
timestamp without time zone |
true |
|||||
overwrite |
boolean |
boolean |
false |
false |
||||
likely_mismatched |
boolean |
boolean |
false |
false |
||||
original_filename |
string |
character varying |
false |
|||||
account_id |
integer |
bigint |
false |
8 |
||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_bulk_imports_on_account_id |
["account_id"] |
false |
btree |
index_bulk_imports_unconfirmed |
["id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
macro | name | options |
---|---|---|
has_many |
{:class_name⇒"BulkImportRow", :inverse_of⇒"bulk_import", :dependent⇒"delete_all"} |
BulkImportRow
-
Table name: bulk_import_rows
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
bulk_import_id |
integer |
bigint |
false |
8 |
||||
data |
jsonb |
jsonb |
true |
|||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_bulk_import_rows_on_bulk_import_id |
["bulk_import_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
bulk_import_id |
{} |
CanonicalEmailBlock
-
Table name: canonical_email_blocks
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
canonical_email_hash |
string |
character varying |
false |
|||||
reference_account_id |
integer |
bigint |
true |
8 |
||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_canonical_email_blocks_on_canonical_email_hash |
["canonical_email_hash"] |
true |
btree |
index_canonical_email_blocks_on_reference_account_id |
["reference_account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
reference_account_id |
{:class_name⇒"Account", :optional⇒true} |
Conversation
-
Table name: conversations
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
uri |
string |
character varying |
true |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_conversations_on_uri |
["uri"] |
true |
btree |
Associations
macro | name | options |
---|---|---|
has_many |
{:dependent⇒nil} |
ConversationMute
-
Table name: conversation_mutes
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
conversation_id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_conversation_mutes_on_account_id_and_conversation_id |
["account_id", "conversation_id"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
conversation_id |
{} |
CustomEmoji
-
Table name: custom_emojis
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
shortcode |
string |
character varying |
false |
|||||
domain |
string |
character varying |
true |
|||||
image_file_name |
string |
character varying |
true |
|||||
image_content_type |
string |
character varying |
true |
|||||
image_file_size |
integer |
integer |
true |
4 |
||||
image_updated_at |
datetime |
timestamp without time zone |
true |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
disabled |
boolean |
boolean |
false |
false |
||||
uri |
string |
character varying |
true |
|||||
image_remote_url |
string |
character varying |
true |
|||||
visible_in_picker |
boolean |
boolean |
true |
false |
||||
category_id |
integer |
bigint |
true |
8 |
||||
image_storage_schema_version |
integer |
integer |
true |
4 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_custom_emojis_on_shortcode_and_domain |
["shortcode", "domain"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
category_id |
{:class_name⇒"CustomEmojiCategory", :optional⇒true} |
macro | name | options |
---|---|---|
has_one |
{:class_name⇒"CustomEmoji", :primary_key⇒"shortcode", :foreign_key⇒"shortcode", :inverse_of⇒false, :dependent⇒nil} |
CustomEmojiCategory
-
Table name: custom_emoji_categories
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
name |
string |
character varying |
true |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_custom_emoji_categories_on_name |
["name"] |
true |
btree |
Associations
macro | name | options |
---|---|---|
has_many |
{:class_name⇒"CustomEmoji", :foreign_key⇒"category_id", :inverse_of⇒"category", :dependent⇒nil} |
CustomFilter
-
Table name: custom_filters
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
true |
8 |
||||
expires_at |
datetime |
timestamp without time zone |
true |
|||||
phrase |
text |
text |
false |
|||||
context |
string |
character varying |
{} |
false |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
action |
integer |
integer |
0 |
false |
4 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_custom_filters_on_account_id |
["account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
macro | name | options |
---|---|---|
has_many |
{:class_name⇒"CustomFilterKeyword", :inverse_of⇒"custom_filter", :dependent⇒"destroy", :autosave⇒true} |
|
has_many |
{:class_name⇒"CustomFilterStatus", :inverse_of⇒"custom_filter", :dependent⇒"destroy"} |
CustomFilterKeyword
-
Table name: custom_filter_keywords
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
custom_filter_id |
integer |
bigint |
false |
8 |
||||
keyword |
text |
text |
false |
|||||
whole_word |
boolean |
boolean |
true |
false |
||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_custom_filter_keywords_on_custom_filter_id |
["custom_filter_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
custom_filter_id |
{} |
CustomFilterStatus
-
Table name: custom_filter_statuses
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
custom_filter_id |
integer |
bigint |
false |
8 |
||||
status_id |
integer |
bigint |
false |
8 |
||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_custom_filter_statuses_on_custom_filter_id |
["custom_filter_id"] |
false |
btree |
index_custom_filter_statuses_on_status_id |
["status_id"] |
false |
btree |
index_custom_filter_statuses_on_status_id_and_custom_filter_id |
["status_id", "custom_filter_id"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
custom_filter_id |
{} |
|
belongs_to |
status_id |
{} |
Device
-
Table name: devices
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
access_token_id |
integer |
bigint |
true |
8 |
||||
account_id |
integer |
bigint |
true |
8 |
||||
device_id |
string |
character varying |
false |
|||||
name |
string |
character varying |
false |
|||||
fingerprint_key |
text |
text |
false |
|||||
identity_key |
text |
text |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_devices_on_access_token_id |
["access_token_id"] |
false |
btree |
index_devices_on_account_id |
["account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
access_token_id |
{:class_name⇒"Doorkeeper::AccessToken"} |
|
belongs_to |
account_id |
{} |
macro | name | options |
---|---|---|
has_many |
{:dependent⇒"destroy", :inverse_of⇒"device"} |
|
has_many |
{:dependent⇒"destroy", :inverse_of⇒"device"} |
DomainAllow
-
Table name: domain_allows
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
domain |
string |
character varying |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_domain_allows_on_domain |
["domain"] |
true |
btree |
Associations
None
DomainBlock
-
Table name: domain_blocks
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
domain |
string |
character varying |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
severity |
integer |
integer |
0 |
true |
4 |
|||
reject_media |
boolean |
boolean |
false |
false |
||||
reject_reports |
boolean |
boolean |
false |
false |
||||
private_comment |
text |
text |
true |
|||||
public_comment |
text |
text |
true |
|||||
obfuscate |
boolean |
boolean |
false |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_domain_blocks_on_domain |
["domain"] |
true |
btree |
Associations
macro | name | options |
---|---|---|
has_many |
{:foreign_key⇒"domain", :primary_key⇒"domain", :inverse_of⇒false, :dependent⇒nil} |
Doorkeeper::AccessGrant
-
Table name: oauth_access_grants
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
token |
string |
character varying |
false |
|||||
expires_in |
integer |
integer |
false |
4 |
||||
redirect_uri |
text |
text |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
revoked_at |
datetime |
timestamp without time zone |
true |
|||||
scopes |
string |
character varying |
true |
|||||
application_id |
integer |
bigint |
false |
8 |
||||
resource_owner_id |
integer |
bigint |
false |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_oauth_access_grants_on_resource_owner_id |
["resource_owner_id"] |
false |
btree |
index_oauth_access_grants_on_token |
["token"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
application_id |
{:class_name⇒"Doorkeeper::Application", :optional⇒true, :inverse_of⇒"access_grants"} |
Doorkeeper::AccessToken
-
Table name: oauth_access_tokens
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
token |
string |
character varying |
false |
|||||
refresh_token |
string |
character varying |
true |
|||||
expires_in |
integer |
integer |
true |
4 |
||||
revoked_at |
datetime |
timestamp without time zone |
true |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
scopes |
string |
character varying |
true |
|||||
application_id |
integer |
bigint |
true |
8 |
||||
resource_owner_id |
integer |
bigint |
true |
8 |
||||
last_used_at |
datetime |
timestamp without time zone |
true |
|||||
last_used_ip |
inet |
inet |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_oauth_access_tokens_on_refresh_token |
["refresh_token"] |
true |
btree |
index_oauth_access_tokens_on_resource_owner_id |
["resource_owner_id"] |
false |
btree |
index_oauth_access_tokens_on_token |
["token"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
application_id |
{:class_name⇒"Doorkeeper::Application", :inverse_of⇒"access_tokens", :optional⇒true} |
macro | name | options |
---|---|---|
has_many |
{:class_name⇒"Web::PushSubscription", :inverse_of⇒"access_token"} |
Doorkeeper::Application
-
Table name: oauth_applications
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
name |
string |
character varying |
false |
|||||
uid |
string |
character varying |
false |
|||||
secret |
string |
character varying |
false |
|||||
redirect_uri |
text |
text |
false |
|||||
scopes |
string |
character varying |
false |
|||||
created_at |
datetime |
timestamp without time zone |
true |
|||||
updated_at |
datetime |
timestamp without time zone |
true |
|||||
superapp |
boolean |
boolean |
false |
false |
||||
website |
string |
character varying |
true |
|||||
owner_type |
string |
character varying |
true |
|||||
owner_id |
integer |
bigint |
true |
8 |
||||
confidential |
boolean |
boolean |
true |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_oauth_applications_on_owner_id_and_owner_type |
["owner_id", "owner_type"] |
false |
btree |
index_oauth_applications_on_superapp |
["superapp"] |
false |
btree |
index_oauth_applications_on_uid |
["uid"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
owner |
owner_id |
{:polymorphic⇒true, :optional⇒true} |
macro | name | options |
---|---|---|
has_many |
{:foreign_key⇒"application_id", :dependent⇒"delete_all", :class_name⇒"Doorkeeper::AccessGrant"} |
|
has_many |
{:foreign_key⇒"application_id", :dependent⇒"delete_all", :class_name⇒"Doorkeeper::AccessToken"} |
|
has_many |
{:foreign_key⇒"application_id", :class_name⇒"Doorkeeper::AccessToken"} |
|
has_many |
{:through⇒"authorized_tokens", :source⇒"application"} |
|
has_many |
{:class_name⇒"User", :foreign_key⇒"created_by_application_id", :inverse_of⇒"created_by_application"} |
EmailDomainBlock
-
Table name: email_domain_blocks
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
domain |
string |
character varying |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
parent_id |
integer |
bigint |
true |
8 |
||||
allow_with_approval |
boolean |
boolean |
false |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_email_domain_blocks_on_domain |
["domain"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
parent_id |
{:class_name⇒"EmailDomainBlock", :optional⇒true} |
macro | name | options |
---|---|---|
has_many |
{:class_name⇒"EmailDomainBlock", :foreign_key⇒"parent_id", :inverse_of⇒"parent", :dependent⇒"destroy"} |
EncryptedMessage
-
Table name: encrypted_messages
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
device_id |
integer |
bigint |
true |
8 |
||||
from_account_id |
integer |
bigint |
true |
8 |
||||
from_device_id |
string |
character varying |
false |
|||||
type |
integer |
integer |
0 |
false |
4 |
|||
body |
text |
text |
false |
|||||
digest |
text |
text |
false |
|||||
message_franking |
text |
text |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_encrypted_messages_on_device_id |
["device_id"] |
false |
btree |
index_encrypted_messages_on_from_account_id |
["from_account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
device_id |
{} |
|
belongs_to |
from_account_id |
{:class_name⇒"Account"} |
Favourite
-
Table name: favourites
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
account_id |
integer |
bigint |
false |
8 |
||||
status_id |
integer |
bigint |
false |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_favourites_on_account_id_and_id |
["account_id", "id"] |
false |
btree |
index_favourites_on_account_id_and_status_id |
["account_id", "status_id"] |
true |
btree |
index_favourites_on_status_id |
["status_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{:inverse_of⇒"favourites"} |
|
belongs_to |
status_id |
{:inverse_of⇒"favourites"} |
macro | name | options |
---|---|---|
has_one |
{:as⇒"activity", :dependent⇒"destroy"} |
FeaturedTag
-
Table name: featured_tags
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
||||
tag_id |
integer |
bigint |
false |
8 |
||||
statuses_count |
integer |
bigint |
0 |
false |
8 |
|||
last_status_at |
datetime |
timestamp without time zone |
true |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
name |
string |
character varying |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_featured_tags_on_account_id_and_tag_id |
["account_id", "tag_id"] |
true |
btree |
index_featured_tags_on_tag_id |
["tag_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{:inverse_of⇒"featured_tags"} |
|
belongs_to |
tag_id |
{:inverse_of⇒"featured_tags", :optional⇒true} |
Follow
-
Table name: follows
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
account_id |
integer |
bigint |
false |
8 |
||||
target_account_id |
integer |
bigint |
false |
8 |
||||
show_reblogs |
boolean |
boolean |
true |
false |
||||
uri |
string |
character varying |
true |
|||||
notify |
boolean |
boolean |
false |
false |
||||
languages |
string |
character varying |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_follows_on_account_id_and_target_account_id |
["account_id", "target_account_id"] |
true |
btree |
index_follows_on_target_account_id |
["target_account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
target_account_id |
{:class_name⇒"Account"} |
macro | name | options |
---|---|---|
has_one |
{:as⇒"activity", :dependent⇒"destroy"} |
FollowRecommendation
-
Table name: global_follow_recommendations
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
account_id |
integer |
bigint |
true |
8 |
||||
rank |
decimal |
numeric |
true |
|||||
reason |
text |
text |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_global_follow_recommendations_on_account_id |
["account_id"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{:foreign_key⇒"account_id", :inverse_of⇒false} |
|
belongs_to |
account_id |
{} |
FollowRecommendationMute
-
Table name: follow_recommendation_mutes
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
||||
target_account_id |
integer |
bigint |
false |
8 |
||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
name | columns | unique | using |
---|---|---|---|
idx_on_account_id_target_account_id_a8c8ddf44e |
["account_id", "target_account_id"] |
true |
btree |
index_follow_recommendation_mutes_on_target_account_id |
["target_account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
target_account_id |
{:class_name⇒"Account"} |
FollowRecommendationSuppression
-
Table name: follow_recommendation_suppressions
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_follow_recommendation_suppressions_on_account_id |
["account_id"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
FollowRequest
-
Table name: follow_requests
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
account_id |
integer |
bigint |
false |
8 |
||||
target_account_id |
integer |
bigint |
false |
8 |
||||
show_reblogs |
boolean |
boolean |
true |
false |
||||
uri |
string |
character varying |
true |
|||||
notify |
boolean |
boolean |
false |
false |
||||
languages |
string |
character varying |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_follow_requests_on_account_id_and_target_account_id |
["account_id", "target_account_id"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
target_account_id |
{:class_name⇒"Account"} |
macro | name | options |
---|---|---|
has_one |
{:as⇒"activity", :dependent⇒"destroy"} |
GeneratedAnnualReport
-
Table name: generated_annual_reports
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
||||
year |
integer |
integer |
false |
4 |
||||
data |
jsonb |
jsonb |
false |
|||||
schema_version |
integer |
integer |
false |
4 |
||||
viewed_at |
datetime |
timestamp(6) without time zone |
true |
6 |
||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_generated_annual_reports_on_account_id_and_year |
["account_id", "year"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
HABTM_Accounts
-
Table name: accounts_tags
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
account_id |
integer |
bigint |
false |
8 |
||||
tag_id |
integer |
bigint |
false |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_accounts_tags_on_account_id_and_tag_id |
["account_id", "tag_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
left_side_id |
{:anonymous_class⇒"Tag", :optional⇒true} |
|
belongs_to |
account_id |
{:optional⇒true} |
HABTM_Statuses
-
Table name: statuses_tags
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
status_id |
integer |
bigint |
false |
8 |
||||
tag_id |
integer |
bigint |
false |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_statuses_tags_on_status_id |
["status_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
left_side_id |
{:anonymous_class⇒"Tag", :optional⇒true} |
|
belongs_to |
status_id |
{:optional⇒true} |
HABTM_Tags
-
Table name: accounts_tags
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
status_id |
integer |
bigint |
false |
8 |
||||
tag_id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_accounts_tags_on_account_id_and_tag_id |
["account_id", "tag_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
left_side_id |
{:anonymous_class⇒"Account", :optional⇒true} |
|
belongs_to |
tag_id |
{:optional⇒true} |
Identity
-
Table name: identities
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
provider |
string |
character varying |
false |
|||||
uid |
string |
character varying |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
user_id |
integer |
bigint |
true |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_identities_on_uid_and_provider |
["uid", "provider"] |
true |
btree |
index_identities_on_user_id |
["user_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
user_id |
{} |
Import
-
Table name: imports
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
type |
integer |
integer |
false |
4 |
||||
approved |
boolean |
boolean |
false |
false |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
data_file_name |
string |
character varying |
true |
|||||
data_content_type |
string |
character varying |
true |
|||||
data_file_size |
integer |
integer |
true |
4 |
||||
data_updated_at |
datetime |
timestamp without time zone |
true |
|||||
account_id |
integer |
bigint |
false |
8 |
||||
overwrite |
boolean |
boolean |
false |
false |
Indexes
None
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
Instance
-
Table name: instances
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
domain |
string |
character varying |
true |
|||||
accounts_count |
integer |
bigint |
true |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_instances_on_domain |
["domain"] |
true |
btree |
index_instances_on_reverse_domain |
reverse'.'::text || (domain)::text, domain |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
domain |
{:foreign_key⇒"domain", :primary_key⇒"domain", :inverse_of⇒false} |
|
belongs_to |
domain |
{:foreign_key⇒"domain", :primary_key⇒"domain", :inverse_of⇒false} |
|
belongs_to |
domain |
{:foreign_key⇒"domain", :primary_key⇒"domain", :inverse_of⇒false} |
macro | name | options |
---|---|---|
has_many |
{:foreign_key⇒"domain", :primary_key⇒"domain", :inverse_of⇒false, :dependent⇒nil} |
Invite
-
Table name: invites
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
user_id |
integer |
bigint |
false |
8 |
||||
code |
string |
character varying |
false |
|||||
expires_at |
datetime |
timestamp without time zone |
true |
|||||
max_uses |
integer |
integer |
true |
4 |
||||
uses |
integer |
integer |
0 |
false |
4 |
|||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
autofollow |
boolean |
boolean |
false |
false |
||||
comment |
text |
text |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_invites_on_code |
["code"] |
true |
btree |
index_invites_on_user_id |
["user_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
user_id |
{:inverse_of⇒"invites"} |
macro | name | options |
---|---|---|
has_many |
{:inverse_of⇒"invite", :dependent⇒nil} |
IpBlock
-
Table name: ip_blocks
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
expires_at |
datetime |
timestamp without time zone |
true |
|||||
ip |
inet |
inet |
0.0.0.0 |
false |
||||
severity |
integer |
integer |
0 |
false |
4 |
|||
comment |
text |
text |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_ip_blocks_on_ip |
["ip"] |
true |
btree |
Associations
None
List
-
Table name: lists
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
||||
title |
string |
character varying |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
replies_policy |
integer |
integer |
0 |
false |
4 |
|||
exclusive |
boolean |
boolean |
false |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_lists_on_account_id |
["account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{:optional⇒true} |
macro | name | options |
---|---|---|
has_many |
{:inverse_of⇒"list", :dependent⇒"destroy"} |
|
has_many |
{:through⇒"list_accounts"} |
ListAccount
-
Table name: list_accounts
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
list_id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
||||
follow_id |
integer |
bigint |
true |
8 |
||||
follow_request_id |
integer |
bigint |
true |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_list_accounts_on_account_id_and_list_id |
["account_id", "list_id"] |
true |
btree |
index_list_accounts_on_follow_id |
["follow_id"] |
false |
btree |
index_list_accounts_on_follow_request_id |
["follow_request_id"] |
false |
btree |
index_list_accounts_on_list_id_and_account_id |
["list_id", "account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
list_id |
{} |
|
belongs_to |
account_id |
{} |
|
belongs_to |
follow_id |
{:optional⇒true} |
|
belongs_to |
follow_request_id |
{:optional⇒true} |
LoginActivity
-
Table name: login_activities
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
user_id |
integer |
bigint |
false |
8 |
||||
authentication_method |
string |
character varying |
true |
|||||
provider |
string |
character varying |
true |
|||||
success |
boolean |
boolean |
true |
|||||
failure_reason |
string |
character varying |
true |
|||||
ip |
inet |
inet |
true |
|||||
user_agent |
string |
character varying |
true |
|||||
created_at |
datetime |
timestamp without time zone |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_login_activities_on_user_id |
["user_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
user_id |
{} |
Marker
-
Table name: markers
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
user_id |
integer |
bigint |
true |
8 |
||||
timeline |
string |
character varying |
false |
|||||
last_read_id |
integer |
bigint |
0 |
false |
8 |
|||
lock_version |
integer |
integer |
0 |
false |
4 |
|||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_markers_on_user_id_and_timeline |
["user_id", "timeline"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
user_id |
{} |
MediaAttachment
-
Table name: media_attachments
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
status_id |
integer |
bigint |
true |
8 |
||||
file_file_name |
string |
character varying |
true |
|||||
file_content_type |
string |
character varying |
true |
|||||
file_file_size |
integer |
integer |
true |
4 |
||||
file_updated_at |
datetime |
timestamp without time zone |
true |
|||||
remote_url |
string |
character varying |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
shortcode |
string |
character varying |
true |
|||||
type |
integer |
integer |
0 |
false |
4 |
|||
file_meta |
json |
json |
true |
|||||
account_id |
integer |
bigint |
true |
8 |
||||
description |
text |
text |
true |
|||||
scheduled_status_id |
integer |
bigint |
true |
8 |
||||
blurhash |
string |
character varying |
true |
|||||
processing |
integer |
integer |
true |
4 |
||||
file_storage_schema_version |
integer |
integer |
true |
4 |
||||
thumbnail_file_name |
string |
character varying |
true |
|||||
thumbnail_content_type |
string |
character varying |
true |
|||||
thumbnail_file_size |
integer |
integer |
true |
4 |
||||
thumbnail_updated_at |
datetime |
timestamp without time zone |
true |
|||||
thumbnail_remote_url |
string |
character varying |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_media_attachments_on_account_id_and_status_id |
["account_id", "status_id"] |
false |
btree |
index_media_attachments_on_scheduled_status_id |
["scheduled_status_id"] |
false |
btree |
index_media_attachments_on_shortcode |
["shortcode"] |
true |
btree |
index_media_attachments_on_status_id |
["status_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{:inverse_of⇒"media_attachments", :optional⇒true} |
|
belongs_to |
status_id |
{:inverse_of⇒"media_attachments", :optional⇒true} |
|
belongs_to |
scheduled_status_id |
{:inverse_of⇒"media_attachments", :optional⇒true} |
Mention
-
Table name: mentions
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
status_id |
integer |
bigint |
false |
8 |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
account_id |
integer |
bigint |
false |
8 |
||||
silent |
boolean |
boolean |
false |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_mentions_on_account_id_and_status_id |
["account_id", "status_id"] |
true |
btree |
index_mentions_on_status_id |
["status_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{:inverse_of⇒"mentions"} |
|
belongs_to |
status_id |
{} |
macro | name | options |
---|---|---|
has_one |
{:as⇒"activity", :dependent⇒"destroy"} |
Mute
-
Table name: mutes
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
hide_notifications |
boolean |
boolean |
true |
false |
||||
account_id |
integer |
bigint |
false |
8 |
||||
target_account_id |
integer |
bigint |
false |
8 |
||||
expires_at |
datetime |
timestamp without time zone |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_mutes_on_account_id_and_target_account_id |
["account_id", "target_account_id"] |
true |
btree |
index_mutes_on_target_account_id |
["target_account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
target_account_id |
{:class_name⇒"Account"} |
Notification
-
Table name: notifications
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
activity_id |
integer |
bigint |
false |
8 |
||||
activity_type |
string |
character varying |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
account_id |
integer |
bigint |
false |
8 |
||||
from_account_id |
integer |
bigint |
false |
8 |
||||
type |
string |
character varying |
true |
|||||
filtered |
boolean |
boolean |
false |
false |
||||
group_key |
string |
character varying |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_notifications_on_account_id_and_group_key |
["account_id", "group_key"] |
false |
btree |
index_notifications_on_account_id_and_id_and_type |
["account_id", "id", "type"] |
false |
btree |
index_notifications_on_activity_id_and_activity_type |
["activity_id", "activity_type"] |
false |
btree |
index_notifications_on_filtered |
["account_id", "id", "type"] |
false |
btree |
index_notifications_on_from_account_id |
["from_account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{:optional⇒true} |
|
belongs_to |
from_account_id |
{:class_name⇒"Account", :optional⇒true} |
|
belongs_to |
activity |
activity_id |
{:polymorphic⇒true, :optional⇒true} |
belongs_to |
activity_id |
{:foreign_key⇒"activity_id", :optional⇒true, :inverse_of⇒"notification"} |
|
belongs_to |
activity_id |
{:foreign_key⇒"activity_id", :optional⇒true, :inverse_of⇒"notification"} |
|
belongs_to |
activity_id |
{:foreign_key⇒"activity_id", :optional⇒true, :inverse_of⇒"notification"} |
|
belongs_to |
activity_id |
{:foreign_key⇒"activity_id", :optional⇒true, :inverse_of⇒"notification"} |
|
belongs_to |
activity_id |
{:foreign_key⇒"activity_id", :optional⇒true, :inverse_of⇒"notification"} |
|
belongs_to |
activity_id |
{:foreign_key⇒"activity_id", :optional⇒true, :inverse_of⇒false} |
|
belongs_to |
activity_id |
{:foreign_key⇒"activity_id", :optional⇒true, :inverse_of⇒false} |
|
belongs_to |
activity_id |
{:foreign_key⇒"activity_id", :optional⇒true, :inverse_of⇒false} |
|
belongs_to |
activity_id |
{:foreign_key⇒"activity_id", :optional⇒true, :inverse_of⇒false} |
NotificationPermission
-
Table name: notification_permissions
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
||||
from_account_id |
integer |
bigint |
false |
8 |
||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_notification_permissions_on_account_id |
["account_id"] |
false |
btree |
index_notification_permissions_on_from_account_id |
["from_account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
from_account_id |
{:class_name⇒"Account"} |
NotificationPolicy
-
Table name: notification_policies
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
||||
filter_not_following |
boolean |
boolean |
false |
false |
||||
filter_not_followers |
boolean |
boolean |
false |
false |
||||
filter_new_accounts |
boolean |
boolean |
false |
false |
||||
filter_private_mentions |
boolean |
boolean |
true |
false |
||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_notification_policies_on_account_id |
["account_id"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
macro | name | options |
---|---|---|
has_many |
{:primary_key⇒"account_id", :foreign_key⇒"account_id", :dependent⇒nil, :inverse_of⇒false} |
NotificationRequest
-
Table name: notification_requests
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
||||
from_account_id |
integer |
bigint |
false |
8 |
||||
last_status_id |
integer |
bigint |
true |
8 |
||||
notifications_count |
integer |
bigint |
0 |
false |
8 |
|||
dismissed |
boolean |
boolean |
false |
false |
||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_notification_requests_on_account_id_and_from_account_id |
["account_id", "from_account_id"] |
true |
btree |
index_notification_requests_on_account_id_and_id |
["account_id", "id"] |
false |
btree |
index_notification_requests_on_from_account_id |
["from_account_id"] |
false |
btree |
index_notification_requests_on_last_status_id |
["last_status_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
from_account_id |
{:class_name⇒"Account"} |
|
belongs_to |
last_status_id |
{:class_name⇒"Status"} |
OneTimeKey
-
Table name: one_time_keys
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
device_id |
integer |
bigint |
true |
8 |
||||
key_id |
string |
character varying |
false |
|||||
key |
text |
text |
false |
|||||
signature |
text |
text |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_one_time_keys_on_device_id |
["device_id"] |
false |
btree |
index_one_time_keys_on_key_id |
["key_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
device_id |
{} |
Poll
-
Table name: polls
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
true |
8 |
||||
status_id |
integer |
bigint |
true |
8 |
||||
expires_at |
datetime |
timestamp without time zone |
true |
|||||
options |
string |
character varying |
{} |
false |
||||
cached_tallies |
integer |
bigint |
{} |
false |
8 |
|||
multiple |
boolean |
boolean |
false |
false |
||||
hide_totals |
boolean |
boolean |
false |
false |
||||
votes_count |
integer |
bigint |
0 |
false |
8 |
|||
last_fetched_at |
datetime |
timestamp without time zone |
true |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
lock_version |
integer |
integer |
0 |
false |
4 |
|||
voters_count |
integer |
bigint |
true |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_polls_on_account_id |
["account_id"] |
false |
btree |
index_polls_on_status_id |
["status_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
status_id |
{} |
macro | name | options |
---|---|---|
has_many |
{:class_name⇒"PollVote", :inverse_of⇒"poll", :dependent⇒"delete_all"} |
|
has_many |
{:class_name⇒"Account", :source⇒"account", :through⇒"votes"} |
|
has_many |
{:class_name⇒"Account", :source⇒"account", :through⇒"votes"} |
|
has_many |
{:as⇒"activity", :dependent⇒"destroy"} |
PollVote
-
Table name: poll_votes
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
true |
8 |
||||
poll_id |
integer |
bigint |
true |
8 |
||||
choice |
integer |
integer |
0 |
false |
4 |
|||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
uri |
string |
character varying |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_poll_votes_on_account_id |
["account_id"] |
false |
btree |
index_poll_votes_on_poll_id |
["poll_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
poll_id |
{:inverse_of⇒"votes"} |
PreviewCard
-
Table name: preview_cards
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
url |
string |
character varying |
false |
|||||
title |
string |
character varying |
false |
|||||
description |
string |
character varying |
false |
|||||
image_file_name |
string |
character varying |
true |
|||||
image_content_type |
string |
character varying |
true |
|||||
image_file_size |
integer |
integer |
true |
4 |
||||
image_updated_at |
datetime |
timestamp without time zone |
true |
|||||
type |
integer |
integer |
0 |
false |
4 |
|||
html |
text |
text |
false |
|||||
author_name |
string |
character varying |
false |
|||||
author_url |
string |
character varying |
false |
|||||
provider_name |
string |
character varying |
false |
|||||
provider_url |
string |
character varying |
false |
|||||
width |
integer |
integer |
0 |
false |
4 |
|||
height |
integer |
integer |
0 |
false |
4 |
|||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
embed_url |
string |
character varying |
false |
|||||
image_storage_schema_version |
integer |
integer |
true |
4 |
||||
blurhash |
string |
character varying |
true |
|||||
language |
string |
character varying |
true |
|||||
max_score |
float |
double precision |
true |
|||||
max_score_at |
datetime |
timestamp without time zone |
true |
|||||
trendable |
boolean |
boolean |
true |
|||||
link_type |
integer |
integer |
true |
4 |
||||
published_at |
datetime |
timestamp(6) without time zone |
true |
6 |
||||
image_description |
string |
character varying |
false |
|||||
author_account_id |
integer |
bigint |
true |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_preview_cards_on_author_account_id |
["author_account_id"] |
false |
btree |
index_preview_cards_on_url |
["url"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
author_account_id |
{:class_name⇒"Account", :optional⇒true} |
macro | name | options |
---|---|---|
has_many |
{:dependent⇒"delete_all", :inverse_of⇒"preview_card"} |
|
has_many |
{:through⇒"preview_cards_statuses"} |
|
has_one |
{:class_name⇒"PreviewCardTrend", :inverse_of⇒"preview_card", :dependent⇒"destroy"} |
PreviewCardProvider
-
Table name: preview_card_providers
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
domain |
string |
character varying |
false |
|||||
icon_file_name |
string |
character varying |
true |
|||||
icon_content_type |
string |
character varying |
true |
|||||
icon_file_size |
integer |
bigint |
true |
8 |
||||
icon_updated_at |
datetime |
timestamp without time zone |
true |
|||||
trendable |
boolean |
boolean |
true |
|||||
reviewed_at |
datetime |
timestamp without time zone |
true |
|||||
requested_review_at |
datetime |
timestamp without time zone |
true |
|||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_preview_card_providers_on_domain |
["domain"] |
true |
btree |
Associations
None
PreviewCardTrend
-
Table name: preview_card_trends
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
preview_card_id |
integer |
bigint |
false |
8 |
||||
score |
float |
double precision |
0.0 |
false |
||||
rank |
integer |
integer |
0 |
false |
4 |
|||
allowed |
boolean |
boolean |
false |
false |
||||
language |
string |
character varying |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_preview_card_trends_on_preview_card_id |
["preview_card_id"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
preview_card_id |
{} |
PreviewCardsStatus
-
Table name: preview_cards_statuses
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
preview_card_id |
integer |
bigint |
false |
8 |
||||
status_id |
integer |
bigint |
false |
8 |
||||
url |
string |
character varying |
true |
Indexes
None
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
preview_card_id |
{} |
|
belongs_to |
status_id |
{} |
RelationshipSeveranceEvent
-
Table name: relationship_severance_events
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
type |
integer |
integer |
false |
4 |
||||
target_name |
string |
character varying |
false |
|||||
purged |
boolean |
boolean |
false |
false |
||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_relationship_severance_events_on_type_and_target_name |
["type", "target_name"] |
false |
btree |
Associations
macro | name | options |
---|---|---|
has_many |
{:inverse_of⇒"relationship_severance_event", :dependent⇒"delete_all"} |
Relay
-
Table name: relays
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
inbox_url |
string |
character varying |
false |
|||||
follow_activity_id |
string |
character varying |
true |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
state |
integer |
integer |
0 |
false |
4 |
Indexes
None
Associations
None
Report
-
Table name: reports
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
status_ids |
integer |
bigint |
{} |
false |
8 |
|||
comment |
text |
text |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
account_id |
integer |
bigint |
false |
8 |
||||
action_taken_by_account_id |
integer |
bigint |
true |
8 |
||||
target_account_id |
integer |
bigint |
false |
8 |
||||
assigned_account_id |
integer |
bigint |
true |
8 |
||||
uri |
string |
character varying |
true |
|||||
forwarded |
boolean |
boolean |
true |
|||||
category |
integer |
integer |
0 |
false |
4 |
|||
action_taken_at |
datetime |
timestamp without time zone |
true |
|||||
rule_ids |
integer |
bigint |
true |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_reports_on_account_id |
["account_id"] |
false |
btree |
index_reports_on_action_taken_by_account_id |
["action_taken_by_account_id"] |
false |
btree |
index_reports_on_assigned_account_id |
["assigned_account_id"] |
false |
btree |
index_reports_on_target_account_id |
["target_account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
target_account_id |
{:class_name⇒"Account"} |
|
belongs_to |
action_taken_by_account_id |
{:class_name⇒"Account", :optional⇒true} |
|
belongs_to |
assigned_account_id |
{:class_name⇒"Account", :optional⇒true} |
macro | name | options |
---|---|---|
has_many |
{:class_name⇒"ReportNote", :inverse_of⇒"report", :dependent⇒"destroy"} |
|
has_many |
{:as⇒"activity", :dependent⇒"destroy"} |
ReportNote
-
Table name: report_notes
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
content |
text |
text |
false |
|||||
report_id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_report_notes_on_account_id |
["account_id"] |
false |
btree |
index_report_notes_on_report_id |
["report_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
report_id |
{:inverse_of⇒"notes", :touch⇒true} |
Rule
-
Table name: rules
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
priority |
integer |
integer |
0 |
false |
4 |
|||
deleted_at |
datetime |
timestamp without time zone |
true |
|||||
text |
text |
text |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
hint |
text |
text |
false |
Indexes
None
Associations
None
ScheduledStatus
-
Table name: scheduled_statuses
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
true |
8 |
||||
scheduled_at |
datetime |
timestamp without time zone |
true |
|||||
params |
jsonb |
jsonb |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_scheduled_statuses_on_account_id |
["account_id"] |
false |
btree |
index_scheduled_statuses_on_scheduled_at |
["scheduled_at"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{:inverse_of⇒"scheduled_statuses"} |
macro | name | options |
---|---|---|
has_many |
{:inverse_of⇒"scheduled_status", :dependent⇒"nullify"} |
SessionActivation
-
Table name: session_activations
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
session_id |
string |
character varying |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
user_agent |
string |
character varying |
false |
|||||
ip |
inet |
inet |
true |
|||||
access_token_id |
integer |
bigint |
true |
8 |
||||
user_id |
integer |
bigint |
false |
8 |
||||
web_push_subscription_id |
integer |
bigint |
true |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_session_activations_on_access_token_id |
["access_token_id"] |
false |
btree |
index_session_activations_on_session_id |
["session_id"] |
true |
btree |
index_session_activations_on_user_id |
["user_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
user_id |
{:inverse_of⇒"session_activations"} |
|
belongs_to |
access_token_id |
{:class_name⇒"Doorkeeper::AccessToken", :dependent⇒"destroy", :optional⇒true} |
|
belongs_to |
web_push_subscription_id |
{:class_name⇒"Web::PushSubscription", :dependent⇒"destroy", :optional⇒true} |
Setting
-
Table name: settings
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
var |
string |
character varying |
false |
|||||
value |
text |
text |
true |
|||||
thing_type |
string |
character varying |
true |
|||||
created_at |
datetime |
timestamp without time zone |
true |
|||||
updated_at |
datetime |
timestamp without time zone |
true |
|||||
thing_id |
integer |
bigint |
true |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_settings_on_thing_type_and_thing_id_and_var |
["thing_type", "thing_id", "var"] |
true |
btree |
Associations
None
SeveredRelationship
-
Table name: severed_relationships
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
relationship_severance_event_id |
integer |
bigint |
false |
8 |
||||
local_account_id |
integer |
bigint |
false |
8 |
||||
remote_account_id |
integer |
bigint |
false |
8 |
||||
direction |
integer |
integer |
false |
4 |
||||
show_reblogs |
boolean |
boolean |
true |
|||||
notify |
boolean |
boolean |
true |
|||||
languages |
string |
character varying |
true |
|||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_severed_relationships_on_local_account_and_event |
["local_account_id", "relationship_severance_event_id"] |
false |
btree |
index_severed_relationships_on_remote_account_id |
["remote_account_id"] |
false |
btree |
index_severed_relationships_on_unique_tuples |
["relationship_severance_event_id", "local_account_id", "direction", "remote_account_id"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
relationship_severance_event_id |
{} |
|
belongs_to |
local_account_id |
{:class_name⇒"Account"} |
|
belongs_to |
remote_account_id |
{:class_name⇒"Account"} |
SiteUpload
-
Table name: site_uploads
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
var |
string |
character varying |
false |
|||||
file_file_name |
string |
character varying |
true |
|||||
file_content_type |
string |
character varying |
true |
|||||
file_file_size |
integer |
integer |
true |
4 |
||||
file_updated_at |
datetime |
timestamp without time zone |
true |
|||||
meta |
json |
json |
true |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
blurhash |
string |
character varying |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_site_uploads_on_var |
["var"] |
true |
btree |
Associations
None
SoftwareUpdate
-
Table name: software_updates
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
version |
string |
character varying |
false |
|||||
urgent |
boolean |
boolean |
false |
false |
||||
type |
integer |
integer |
0 |
false |
4 |
|||
release_notes |
string |
character varying |
false |
|||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_software_updates_on_version |
["version"] |
true |
btree |
Associations
None
Status
-
Table name: statuses
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
uri |
string |
character varying |
true |
|||||
text |
text |
text |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
in_reply_to_id |
integer |
bigint |
true |
8 |
||||
reblog_of_id |
integer |
bigint |
true |
8 |
||||
url |
string |
character varying |
true |
|||||
sensitive |
boolean |
boolean |
false |
false |
||||
visibility |
integer |
integer |
0 |
false |
4 |
|||
spoiler_text |
text |
text |
false |
|||||
reply |
boolean |
boolean |
false |
false |
||||
language |
string |
character varying |
true |
|||||
conversation_id |
integer |
bigint |
true |
8 |
||||
local |
boolean |
boolean |
true |
|||||
account_id |
integer |
bigint |
false |
8 |
||||
application_id |
integer |
bigint |
true |
8 |
||||
in_reply_to_account_id |
integer |
bigint |
true |
8 |
||||
poll_id |
integer |
bigint |
true |
8 |
||||
deleted_at |
datetime |
timestamp without time zone |
true |
|||||
edited_at |
datetime |
timestamp without time zone |
true |
|||||
trendable |
boolean |
boolean |
true |
|||||
ordered_media_attachment_ids |
integer |
bigint |
true |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_statuses_20190820 |
["account_id", "id", "visibility", "updated_at"] |
false |
btree |
index_statuses_local_20190824 |
["id", "account_id"] |
false |
btree |
index_statuses_on_account_id |
["account_id"] |
false |
btree |
index_statuses_on_deleted_at |
["deleted_at"] |
false |
btree |
index_statuses_on_in_reply_to_account_id |
["in_reply_to_account_id"] |
false |
btree |
index_statuses_on_in_reply_to_id |
["in_reply_to_id"] |
false |
btree |
index_statuses_on_reblog_of_id_and_account_id |
["reblog_of_id", "account_id"] |
false |
btree |
index_statuses_on_uri |
["uri"] |
true |
btree |
index_statuses_public_20200119 |
["id", "account_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
application_id |
{:class_name⇒"Doorkeeper::Application", :optional⇒true} |
|
belongs_to |
account_id |
{:inverse_of⇒"statuses"} |
|
belongs_to |
in_reply_to_account_id |
{:class_name⇒"Account", :optional⇒true} |
|
belongs_to |
conversation_id |
{:optional⇒true} |
|
belongs_to |
poll_id |
{:class_name⇒"Poll", :foreign_key⇒"poll_id", :optional⇒true, :inverse_of⇒false} |
|
belongs_to |
in_reply_to_id |
{:class_name⇒"Status", :optional⇒true, :foreign_key⇒"in_reply_to_id", :inverse_of⇒"replies"} |
|
belongs_to |
reblog_of_id |
{:class_name⇒"Status", :optional⇒true, :foreign_key⇒"reblog_of_id", :inverse_of⇒"reblogs"} |
macro | name | options |
---|---|---|
has_many |
{:class_name⇒"StatusEdit", :inverse_of⇒"status", :dependent⇒"destroy"} |
|
has_many |
{:inverse_of⇒"status", :dependent⇒"destroy"} |
|
has_many |
{:inverse_of⇒"status", :dependent⇒"destroy"} |
|
has_many |
{:foreign_key⇒"reblog_of_id", :class_name⇒"Status", :inverse_of⇒"reblog", :dependent⇒"destroy"} |
|
has_many |
{:through⇒"reblogs", :class_name⇒"Account", :source⇒"account"} |
|
has_many |
{:foreign_key⇒"in_reply_to_id", :class_name⇒"Status", :inverse_of⇒"thread", :dependent⇒nil} |
|
has_many |
{:dependent⇒"destroy", :inverse_of⇒"status"} |
|
has_many |
{:through⇒"mentions", :source⇒"account", :class_name⇒"Account"} |
|
has_many |
{:dependent⇒"nullify"} |
|
has_many |
{:class_name⇒"Mention", :inverse_of⇒"status"} |
|
has_many |
{:through⇒"active_mentions", :source⇒"account"} |
|
has_many |
{:through⇒"favourites", :source⇒"account"} |
|
has_many |
{:through⇒"reblogs", :source⇒"account"} |
|
has_many |
{:through⇒"bookmarks", :source⇒"account"} |
|
has_and_belongs_to_many |
{} |
|
has_one |
{:inverse_of⇒"status", :dependent⇒"delete"} |
|
has_one |
{:as⇒"activity", :dependent⇒"destroy"} |
|
has_one |
{:inverse_of⇒"status", :dependent⇒nil} |
|
has_one |
{:inverse_of⇒"status", :dependent⇒"destroy", :autosave⇒true} |
|
has_one |
{:class_name⇒"StatusTrend", :inverse_of⇒"status", :dependent⇒nil} |
StatusEdit
-
Table name: status_edits
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
status_id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
true |
8 |
||||
text |
text |
text |
false |
|||||
spoiler_text |
text |
text |
false |
|||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
ordered_media_attachment_ids |
integer |
bigint |
true |
8 |
||||
media_descriptions |
text |
text |
true |
|||||
poll_options |
string |
character varying |
true |
|||||
sensitive |
boolean |
boolean |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_status_edits_on_account_id |
["account_id"] |
false |
btree |
index_status_edits_on_status_id |
["status_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
status_id |
{} |
|
belongs_to |
account_id |
{:optional⇒true} |
StatusPin
-
Table name: status_pins
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
||||
status_id |
integer |
bigint |
false |
8 |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_status_pins_on_account_id_and_status_id |
["account_id", "status_id"] |
true |
btree |
index_status_pins_on_status_id |
["status_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
|
belongs_to |
status_id |
{} |
StatusStat
-
Table name: status_stats
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
status_id |
integer |
bigint |
false |
8 |
||||
replies_count |
integer |
bigint |
0 |
false |
8 |
|||
reblogs_count |
integer |
bigint |
0 |
false |
8 |
|||
favourites_count |
integer |
bigint |
0 |
false |
8 |
|||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_status_stats_on_status_id |
["status_id"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
status_id |
{:inverse_of⇒"status_stat"} |
StatusTrend
-
Table name: status_trends
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
status_id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
||||
score |
float |
double precision |
0.0 |
false |
||||
rank |
integer |
integer |
0 |
false |
4 |
|||
allowed |
boolean |
boolean |
false |
false |
||||
language |
string |
character varying |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_status_trends_on_account_id |
["account_id"] |
false |
btree |
index_status_trends_on_status_id |
["status_id"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
status_id |
{} |
|
belongs_to |
account_id |
{} |
SystemKey
-
Table name: system_keys
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
key |
binary |
bytea |
true |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
None
Associations
None
Tag
-
Table name: tags
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
name |
string |
character varying |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
usable |
boolean |
boolean |
true |
|||||
trendable |
boolean |
boolean |
true |
|||||
listable |
boolean |
boolean |
true |
|||||
reviewed_at |
datetime |
timestamp without time zone |
true |
|||||
requested_review_at |
datetime |
timestamp without time zone |
true |
|||||
last_status_at |
datetime |
timestamp without time zone |
true |
|||||
max_score |
float |
double precision |
true |
|||||
max_score_at |
datetime |
timestamp without time zone |
true |
|||||
display_name |
string |
character varying |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_tags_on_name_lower_btree |
lower((name)::text) text_pattern_ops |
true |
btree |
Associations
macro | name | options |
---|---|---|
has_and_belongs_to_many |
{} |
|
has_and_belongs_to_many |
{} |
|
has_many |
{:class_name⇒"TagFollow", :inverse_of⇒"tag", :dependent⇒"destroy"} |
|
has_many |
{:dependent⇒"destroy", :inverse_of⇒"tag"} |
|
has_many |
{:through⇒"passive_relationships", :source⇒"account"} |
TagFollow
-
Table name: tag_follows
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
tag_id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
false |
8 |
||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_tag_follows_on_account_id_and_tag_id |
["account_id", "tag_id"] |
true |
btree |
index_tag_follows_on_tag_id |
["tag_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
tag_id |
{:autosave⇒true} |
|
belongs_to |
account_id |
{} |
Tombstone
-
Table name: tombstones
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
account_id |
integer |
bigint |
true |
8 |
||||
uri |
string |
character varying |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
by_moderator |
boolean |
boolean |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_tombstones_on_account_id |
["account_id"] |
false |
btree |
index_tombstones_on_uri |
["uri"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{} |
UnavailableDomain
-
Table name: unavailable_domains
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
domain |
string |
character varying |
false |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_unavailable_domains_on_domain |
["domain"] |
true |
btree |
Associations
None
User
-
Table name: users
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
string |
character varying |
false |
||||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
encrypted_password |
string |
character varying |
false |
|||||
reset_password_token |
string |
character varying |
true |
|||||
reset_password_sent_at |
datetime |
timestamp without time zone |
true |
|||||
sign_in_count |
integer |
integer |
0 |
false |
4 |
|||
current_sign_in_at |
datetime |
timestamp without time zone |
true |
|||||
last_sign_in_at |
datetime |
timestamp without time zone |
true |
|||||
confirmation_token |
string |
character varying |
true |
|||||
confirmed_at |
datetime |
timestamp without time zone |
true |
|||||
confirmation_sent_at |
datetime |
timestamp without time zone |
true |
|||||
unconfirmed_email |
string |
character varying |
true |
|||||
locale |
string |
character varying |
true |
|||||
encrypted_otp_secret |
string |
character varying |
true |
|||||
encrypted_otp_secret_iv |
string |
character varying |
true |
|||||
encrypted_otp_secret_salt |
string |
character varying |
true |
|||||
consumed_timestep |
integer |
integer |
true |
4 |
||||
otp_required_for_login |
boolean |
boolean |
false |
false |
||||
last_emailed_at |
datetime |
timestamp without time zone |
true |
|||||
otp_backup_codes |
string |
character varying |
true |
|||||
account_id |
integer |
bigint |
false |
8 |
||||
disabled |
boolean |
boolean |
false |
false |
||||
invite_id |
integer |
bigint |
true |
8 |
||||
chosen_languages |
string |
character varying |
true |
|||||
created_by_application_id |
integer |
bigint |
true |
8 |
||||
approved |
boolean |
boolean |
true |
false |
||||
sign_in_token |
string |
character varying |
true |
|||||
sign_in_token_sent_at |
datetime |
timestamp without time zone |
true |
|||||
webauthn_id |
string |
character varying |
true |
|||||
sign_up_ip |
inet |
inet |
true |
|||||
role_id |
integer |
bigint |
true |
8 |
||||
settings |
text |
text |
true |
|||||
time_zone |
string |
character varying |
true |
|||||
otp_secret |
string |
character varying |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_users_on_account_id |
["account_id"] |
false |
btree |
index_users_on_confirmation_token |
["confirmation_token"] |
true |
btree |
index_users_on_created_by_application_id |
["created_by_application_id"] |
false |
btree |
index_users_on_email |
["email"] |
true |
btree |
index_users_on_reset_password_token |
["reset_password_token"] |
true |
btree |
index_users_on_role_id |
["role_id"] |
false |
btree |
index_users_on_unconfirmed_email |
["unconfirmed_email"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
account_id |
{:inverse_of⇒"user", :autosave⇒true} |
|
belongs_to |
invite_id |
{:counter_cache⇒"uses", :optional⇒true} |
|
belongs_to |
created_by_application_id |
{:class_name⇒"Doorkeeper::Application", :optional⇒true} |
|
belongs_to |
role_id |
{:class_name⇒"UserRole", :optional⇒true} |
macro | name | options |
---|---|---|
has_many |
{:class_name⇒"Doorkeeper::Application", :as⇒"owner", :dependent⇒nil} |
|
has_many |
{:inverse_of⇒"user", :dependent⇒nil} |
|
has_many |
{:inverse_of⇒"user", :dependent⇒nil} |
|
has_many |
{:inverse_of⇒"user", :dependent⇒"destroy"} |
|
has_many |
{:dependent⇒"destroy"} |
|
has_many |
{:class_name⇒"UserIp", :inverse_of⇒"user", :dependent⇒nil} |
|
has_one |
{:class_name⇒"UserInviteRequest", :inverse_of⇒"user", :dependent⇒"destroy", :autosave⇒true} |
|
has_many |
{:dependent⇒"destroy"} |
UserInviteRequest
-
Table name: user_invite_requests
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
user_id |
integer |
bigint |
true |
8 |
||||
text |
text |
text |
true |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_user_invite_requests_on_user_id |
["user_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
user_id |
{:inverse_of⇒"invite_request"} |
UserIp
-
Table name: user_ips
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
user_id |
integer |
bigint |
true |
8 |
||||
ip |
inet |
inet |
true |
|||||
used_at |
datetime |
timestamp without time zone |
true |
Indexes
None
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
user_id |
{} |
UserRole
-
Table name: user_roles
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
name |
string |
character varying |
false |
|||||
color |
string |
character varying |
false |
|||||
position |
integer |
integer |
0 |
false |
4 |
|||
permissions |
integer |
bigint |
0 |
false |
8 |
|||
highlighted |
boolean |
boolean |
false |
false |
||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
Indexes
None
Associations
macro | name | options |
---|---|---|
has_many |
{:inverse_of⇒"role", :foreign_key⇒"role_id", :dependent⇒"nullify"} |
Web::PushSubscription
-
Table name: web_push_subscriptions
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
endpoint |
string |
character varying |
false |
|||||
key_p256dh |
string |
character varying |
false |
|||||
key_auth |
string |
character varying |
false |
|||||
data |
json |
json |
true |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
access_token_id |
integer |
bigint |
true |
8 |
||||
user_id |
integer |
bigint |
true |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_web_push_subscriptions_on_access_token_id |
["access_token_id"] |
false |
btree |
index_web_push_subscriptions_on_user_id |
["user_id"] |
false |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
user_id |
{:optional⇒true} |
|
belongs_to |
access_token_id |
{:class_name⇒"Doorkeeper::AccessToken", :optional⇒true} |
macro | name | options |
---|---|---|
has_one |
{:foreign_key⇒"web_push_subscription_id", :inverse_of⇒"web_push_subscription", :dependent⇒nil} |
Web::Setting
-
Table name: web_settings
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
data |
json |
json |
true |
|||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
|||||
user_id |
integer |
bigint |
false |
8 |
Indexes
name | columns | unique | using |
---|---|---|---|
index_web_settings_on_user_id |
["user_id"] |
true |
btree |
Associations
macro | name | foreign_key | options |
---|---|---|---|
belongs_to |
user_id |
{} |
WebauthnCredential
-
Table name: webauthn_credentials
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
external_id |
string |
character varying |
false |
|||||
public_key |
string |
character varying |
false |
|||||
nickname |
string |
character varying |
false |
|||||
sign_count |
integer |
bigint |
0 |
false |
8 |
|||
user_id |
integer |
bigint |
true |
8 |
||||
created_at |
datetime |
timestamp without time zone |
false |
|||||
updated_at |
datetime |
timestamp without time zone |
false |
Indexes
name | columns | unique | using |
---|---|---|---|
index_webauthn_credentials_on_external_id |
["external_id"] |
true |
btree |
index_webauthn_credentials_on_user_id |
["user_id"] |
false |
btree |
index_webauthn_credentials_on_user_id_and_nickname |
["user_id", "nickname"] |
true |
btree |
Associations
None
Webhook
-
Table name: webhooks
-
Comment:
Columns
name | type | sql_type | default | null | limit | precision | scale | comment |
---|---|---|---|---|---|---|---|---|
id |
integer |
bigint |
false |
8 |
||||
url |
string |
character varying |
false |
|||||
events |
string |
character varying |
{} |
false |
||||
secret |
string |
character varying |
false |
|||||
enabled |
boolean |
boolean |
true |
false |
||||
created_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
updated_at |
datetime |
timestamp(6) without time zone |
false |
6 |
||||
template |
text |
text |
true |
Indexes
name | columns | unique | using |
---|---|---|---|
index_webhooks_on_url |
["url"] |
true |
btree |
Associations
None