85 Foreign Key Constraints
| Constraint Name | Child Column | Parent Column | Delete Rule | ||
|---|---|---|---|---|---|
| collection_article_id_foreign |
|
|
Restrict delete | ||
| collection_entrance_id_foreign |
|
|
Restrict delete | ||
| article_boost_article_id_foreign |
|
|
Restrict delete | ||
| transaction_recipient_id_foreign |
|
|
Restrict delete | ||
| transaction_sender_id_foreign |
|
|
Restrict delete | ||
| feedback_asset_feedback_id_foreign |
|
|
Restrict delete | ||
| feedback_asset_asset_id_foreign |
|
|
Restrict delete | ||
| appreciation_recipient_id_foreign |
|
|
Restrict delete | ||
| appreciation_sender_id_foreign |
|
|
Restrict delete | ||
| matters_today_article_id_foreign |
|
|
Restrict delete | ||
| user_oauth_user_id_foreign |
|
|
Restrict delete | ||
| action_comment_user_id_foreign |
|
|
Restrict delete | ||
| action_comment_target_id_foreign |
|
|
Restrict delete | ||
| customer_user_id_foreign |
|
|
Restrict delete | ||
| report_asset_asset_id_foreign |
|
|
Restrict delete | ||
| report_asset_report_id_foreign |
|
|
Restrict delete | ||
| user_oauth_likecoin_liker_id_foreign |
|
|
Restrict delete | ||
| payout_account_user_id_foreign |
|
|
Restrict delete | ||
| action_article_user_id_foreign |
|
|
Restrict delete | ||
| action_article_target_id_foreign |
|
|
Restrict delete | ||
| verification_code_user_id_foreign |
|
|
Restrict delete | ||
| tag_boost_tag_id_foreign |
|
|
Restrict delete | ||
| punish_record_user_id_foreign |
|
|
Restrict delete | ||
| matters_choice_article_id_foreign |
|
|
Restrict delete | ||
| release_cover_foreign |
|
|
Restrict delete | ||
| action_tag_user_id_foreign |
|
|
Restrict delete | ||
| action_tag_target_id_foreign |
|
|
Restrict delete | ||
| invitation_sender_id_foreign |
|
|
Restrict delete | ||
| invitation_recipient_id_foreign |
|
|
Restrict delete | ||
| notice_actor_notice_id_foreign |
|
|
Restrict delete | ||
| notice_actor_actor_id_foreign |
|
|
Restrict delete | ||
| username_edit_history_user_id_foreign |
|
|
Restrict delete | ||
| comment_mentioned_user_comment_id_foreign |
|
|
Restrict delete | ||
| comment_mentioned_user_user_id_foreign |
|
|
Restrict delete | ||
| oauth_client_avatar_foreign |
|
|
Restrict delete | ||
| oauth_client_user_id_foreign |
|
|
Restrict delete | ||
| oauth_access_token_client_id_foreign |
|
|
Restrict delete | ||
| oauth_access_token_user_id_foreign |
|
|
Restrict delete | ||
| article_tag_tag_id_foreign |
|
|
Restrict delete | ||
| article_tag_article_id_foreign |
|
|
Restrict delete | ||
| feedback_user_id_foreign |
|
|
Restrict delete | ||
| article_read_article_id_foreign |
|
|
Restrict delete | ||
| article_read_user_id_foreign |
|
|
Restrict delete | ||
| notice_notice_detail_id_foreign |
|
|
Restrict delete | ||
| notice_recipient_id_foreign |
|
|
Restrict delete | ||
| user_notify_setting_user_id_foreign |
|
|
Restrict delete | ||
| action_user_user_id_foreign |
|
|
Restrict delete | ||
| action_user_target_id_foreign |
|
|
Restrict delete | ||
| transaction_recipient_id_foreign |
|
|
Restrict delete | ||
| transaction_target_type_foreign |
|
|
Restrict delete | ||
| transaction_sender_id_foreign |
|
|
Restrict delete | ||
| article_recommend_setting_article_id_foreign |
|
|
Restrict delete | ||
| comment_author_id_foreign |
|
|
Restrict delete | ||
| comment_article_id_foreign |
|
|
Restrict delete | ||
| comment_reply_to_foreign |
|
|
Restrict delete | ||
| comment_parent_comment_id_foreign |
|
|
Restrict delete | ||
| user_badge_user_id_foreign |
|
|
Restrict delete | ||
| push_device_user_id_foreign |
|
|
Restrict delete | ||
| audio_draft_author_id_foreign |
|
|
Restrict delete | ||
| audio_draft_audio_foreign |
|
|
Restrict delete | ||
| asset_map_asset_id_foreign |
|
|
Restrict delete | ||
| asset_map_entity_type_id_foreign |
|
|
Restrict delete | ||
| article_read_count_user_id_foreign |
|
|
Restrict delete | ||
| article_read_count_article_id_foreign |
|
|
Restrict delete | ||
| notice_entity_notice_id_foreign |
|
|
Restrict delete | ||
| notice_entity_entity_type_id_foreign |
|
|
Restrict delete | ||
| log_record_user_id_foreign |
|
|
Restrict delete | ||
| draft_cover_foreign |
|
|
Restrict delete | ||
| draft_author_id_foreign |
|
|
Restrict delete | ||
| draft_upstream_id_foreign |
|
|
Restrict delete | ||
| user_boost_user_id_foreign |
|
|
Restrict delete | ||
| asset_author_id_foreign |
|
|
Restrict delete | ||
| report_article_id_foreign |
|
|
Restrict delete | ||
| report_user_id_foreign |
|
|
Restrict delete | ||
| report_comment_id_foreign |
|
|
Restrict delete | ||
| user_avatar_foreign |
|
|
Restrict delete | ||
| oauth_refresh_token_user_id_foreign |
|
|
Restrict delete | ||
| oauth_refresh_token_client_id_foreign |
|
|
Restrict delete | ||
| oauth_authorization_code_client_id_foreign |
|
|
Restrict delete | ||
| oauth_authorization_code_user_id_foreign |
|
|
Restrict delete | ||
| article_cover_foreign |
|
|
Restrict delete | ||
| article_author_id_foreign |
|
|
Restrict delete | ||
| article_upstream_id_foreign |
|
|
Restrict delete | ||
| article_draft_id_foreign |
|
|
Restrict delete | ||
| serach_history_user_id_foreign |
|
|
Restrict delete |
Check Constraints
| Table | Constraint Name | Constraint |
|---|---|---|
| transaction_obsolete | transaction_purpose_check | ((purpose = ANY (ARRAY['appreciate'::text, 'appreciate-comment'::text, 'appreciate-subsidy'::text, 'invitation-accepted'::text, 'join-by-invitation'::text, 'join-by-task'::text, 'first-post'::text, 'system-subsidy'::text]))) |
| transaction_obsolete | transaction_type_check | ((type = ANY (ARRAY['LIKE'::text, 'MAT'::text]))) |
| appreciation | appreciation_purpose_check | ((purpose = ANY (ARRAY['appreciate'::text, 'appreciate-comment'::text, 'appreciate-subsidy'::text, 'invitation-accepted'::text, 'join-by-invitation'::text, 'join-by-task'::text, 'first-post'::text, 'system-subsidy'::text]))) |
| appreciation | appreciation_type_check | ((type = ANY (ARRAY['LIKE'::text, 'MAT'::text]))) |
| user_oauth | user_oauth_provider_check | ((provider = ANY (ARRAY['facebook'::text, 'google'::text, 'medium'::text]))) |
| action_comment | action_comment_action_check | ((action = ANY (ARRAY['up_vote'::text, 'down_vote'::text]))) |
| customer | customer_provider_check | ((provider = 'stripe'::text)) |
| user_oauth_likecoin | user_oauth_likecoin_account_type_check | ((account_type = ANY (ARRAY['temporal'::text, 'general'::text]))) |
| payout_account | payout_account_provider_check | ((provider = 'stripe'::text)) |
| payout_account | payout_account_type_check | ((type = ANY (ARRAY['express'::text, 'standard'::text]))) |
| action_article | action_article_action_check | ((action = 'subscribe'::text)) |
| verification_code | verification_code_status_check | ((status = ANY (ARRAY['active'::text, 'inactive'::text, 'verified'::text, 'expired'::text, 'used'::text]))) |
| verification_code | verification_code_type_check | ((type = ANY (ARRAY['register'::text, 'email_reset'::text, 'email_reset_confirm'::text, 'password_reset'::text, 'payment_password_reset'::text, 'email_verify'::text]))) |
| punish_record | punish_record_state_check | ((state = 'banned'::text)) |
| blocklist | blocklist_type_check | ((type = ANY (ARRAY['agent_hash'::text, 'email'::text, 'domain'::text]))) |
| release | release_channel_check | ((channel = ANY (ARRAY['appStore'::text, 'googlePlay'::text]))) |
| release | release_platform_check | ((platform = ANY (ARRAY['ios'::text, 'android'::text]))) |
| action_tag | action_tag_action_check | ((action = 'follow'::text)) |
| invitation | invitation_status_check | ((status = ANY (ARRAY['pending'::text, 'activated'::text]))) |
| action_user | action_user_action_check | ((action = ANY (ARRAY['follow'::text, 'rate'::text, 'block'::text]))) |
| transaction | transaction_currency_check | ((currency = ANY (ARRAY['HKD'::text, 'LIKE'::text]))) |
| transaction | transaction_provider_check | ((provider = ANY (ARRAY['stripe'::text, 'likecoin'::text, 'matters'::text]))) |
| transaction | transaction_purpose_check | ((purpose = ANY (ARRAY['appreciate'::text, 'appreciate-comment'::text, 'appreciate-subsidy'::text, 'invitation-accepted'::text, 'join-by-invitation'::text, 'join-by-task'::text, 'first-post'::text, 'system-subsidy'::text]))) |
| transaction | transaction_state_check | ((state = ANY (ARRAY['pending'::text, 'succeeded'::text, 'failed'::text, 'canceled'::text]))) |
| comment | comment_state_check | ((state = ANY (ARRAY['active'::text, 'archived'::text, 'banned'::text, 'collapsed'::text]))) |
| user_badge | user_badge_type_check | ((type = 'seed'::text)) |
| push_device | push_device_platform_check | ((platform = ANY (ARRAY['ios'::text, 'android'::text, 'web'::text]))) |
| push_device | push_device_provider_check | ((provider = ANY (ARRAY['jpush'::text, 'fcm'::text]))) |
| feature_flag | feature_flag_flag_check | ((flag = ANY (ARRAY['on'::text, 'off'::text, 'admin'::text]))) |
| draft | draft_publish_state_check | ((publish_state = ANY (ARRAY['unpublished'::text, 'pending'::text, 'published'::text, 'error'::text]))) |
| user | user_language_check | ((language = ANY (ARRAY['zh_hant'::text, 'zh_hans'::text, 'en'::text]))) |
| user | user_role_check | ((role = ANY (ARRAY['user'::text, 'admin'::text]))) |
| user | user_state_check | ((state = ANY (ARRAY['onboarding'::text, 'active'::text, 'banned'::text, 'frozen'::text, 'archived'::text]))) |
| article | article_state_check | ((state = ANY (ARRAY['active'::text, 'banned'::text, 'archived'::text]))) |