rendered paste body
alter table artist
drop constraint fk_artist_born_in_country
;
alter table artist
drop constraint fk_artist_first_rel_country
;
alter table artist
drop constraint fk_artist_has_biography_story
;
alter table artist
drop constraint fk_artist_has_editor_note
;
alter table artist
drop constraint fk_artist_celebrity_playlist
;
alter table artist
drop constraint fk_artist_contemp_artists
;
alter table artist
drop constraint fk_artist_has_followers
;
alter table artist
drop constraint fk_artist_has_image_set
;
alter table artist
drop constraint fk_artist_infulenced_by
;
alter table artist
drop constraint fk_artist_has_primary_image
;
alter table artist
drop constraint fk_artist_has_primary_story
;
alter table artist
drop constraint fk_artist_has_article_set
;
alter table artist
drop constraint fk_artist_has_track_set
;
alter table artist
drop constraint fk_artist_has_primary_genre
;
alter table artist_aka
drop constraint fk_artist_has_aka
;
alter table artist_count
drop constraint fk_artist_count_for_country
;
alter table artist_count
drop constraint fk_artist_count_for_device
;
alter table artist_count
drop constraint fk_artist_count_for_distrib
;
alter table artist_count
drop constraint fk_artist_count_for_operator
;
alter table artist_count
drop constraint fk_artist_count_for_service
;
alter table artist_count
drop constraint fk_artist_has_count
;
alter table artist_count_live
drop constraint fk_artlive_has_count
;
alter table artist_count_live
drop constraint fk_artlive_has_service
;
alter table artist_count_live_aday
drop constraint fk_artlive_has_count_a
;
alter table artist_count_live_aday
drop constraint fk_artlive_has_service_a
;
alter table artist_data
drop constraint fk_artist_data_for_service
;
alter table artist_data
drop constraint fk_artist_has_one_data
;
alter table artist_data
drop constraint fk_artist_boughtby_customer
;
alter table artist_data
drop constraint fk_artist_playedby_customer
;
alter table artist_data
drop constraint fk_artist_ratedby_customer
;
alter table artist_data
drop constraint fk_artist_lastsearch_cust
;
alter table artist_genre
drop constraint fk_artist_genre_is_genre
;
alter table artist_genre
drop constraint fk_artist_has_genres
;
alter table artist_list_item
drop constraint fk_artist_list_item_artist_set
;
alter table artist_list_item
drop constraint fk_artist_list_has_items
;
alter table artist_list_lang
drop constraint fk_artist_list_has_langs
;
alter table artist_list_lang
drop constraint fk_art_list_lang_has_lang
;
alter table artist_set
drop constraint fk_artist_set_has_genre
;
alter table artist_set
drop constraint fk_artist_set_has_editor_note
;
alter table artist_set_item
drop constraint fk_artist_set_is_artist
;
alter table artist_set_item
drop constraint fk_artist_set_item_editor_note
;
alter table artist_set_item
drop constraint fk_artist_set_has_artists
;
alter table artist_set_lang
drop constraint fk_artist_set_has_langs
;
alter table artist_set_lang
drop constraint fk_artist_s_lang_has_lang
;
alter table artist_set_lang
drop constraint fk_artist_s_lang_has_image_set
;
alter table billing_group_task
drop constraint fk_bill_gtask_has_b_event
;
alter table billing_group_task
drop constraint fk_bill_gtask_has_srv_subs
;
alter table chart
drop constraint fk_chart_has_cur_release
;
alter table chart
drop constraint fk_chart_has_editor_note
;
alter table chart
drop constraint fk_chart_has_genre
;
alter table chart
drop constraint fk_chart_has_image_set
;
alter table chart
drop constraint fk_chart_origin_country
;
alter table chart_release
drop constraint fk_chart_has_releases
;
alter table chart_release
drop constraint fk_chart_rel_has_editor_note
;
alter table chart_release_item
drop constraint fk_chart_rel_is_artist
;
alter table chart_release_item
drop constraint fk_chart_rel_is_cust
;
alter table chart_release_item
drop constraint fk_chart_rel_is_playlist
;
alter table chart_release_item
drop constraint fk_chart_rel_is_relase
;
alter table chart_release_item
drop constraint fk_chart_rel_is_track
;
alter table chart_release_item
drop constraint fk_chart_rel_item_editor_note
;
alter table chart_release_item
drop constraint fk_chart_has_items
;
alter table chart_set
drop constraint fk_chart_set_has_editor_note
;
alter table chart_set_item
drop constraint fk_chart_set_item_is_chart
;
alter table chart_set_item
drop constraint fk_chart_set_item_editor_note
;
alter table chart_set_item
drop constraint fk_chart_set_has_item
;
alter table chart_set_lang
drop constraint fk_cset_lang_has_chart_set
;
alter table chart_set_lang
drop constraint fk_cset_lang_has_image_set
;
alter table chart_set_lang
drop constraint fk_cset_lang_has_language
;
alter table client
drop constraint fk_client_has_device
;
alter table client_build
drop constraint fk_client_b_has_default_lang
;
alter table client_build
drop constraint fk_client_build_has_device
;
alter table client_build
drop constraint fk_client_b_has_image_set
;
alter table client_build
drop constraint fk_client_build_has_service
;
alter table client_build
drop constraint fk_client_build_has_version
;
alter table client_build
drop constraint fk_c_build_sup_end_message
;
alter table client_build_event_type
drop constraint fk_c_b_evt_type_is_evt_type
;
alter table client_build_event_type
drop constraint fk_client_build_has_events
;
alter table client_build_exception_config
drop constraint fk_c_build_excp_is_exception
;
alter table client_build_exception_config
drop constraint fk_client_build_has_exceptions
;
alter table client_build_message
drop constraint fk_client_bl_mess_has_message
;
alter table client_build_message
drop constraint fk_client_build_has_messages
;
alter table client_build_message
drop constraint fk_client_b_mess_is_key
;
alter table client_build_property
drop constraint fk_client_bl_prop_has_prop
;
alter table client_build_property
drop constraint fk_client_build_has_properties
;
alter table client_build_property
drop constraint fk_propkey_in_client_build
;
alter table client_subscription
drop constraint fk_client_subscriptn_has_mps
;
alter table client_version
drop constraint fk_client_v_has_evt_type_set
;
alter table client_version
drop constraint fk_c_version_has_excpt_set
;
alter table client_version
drop constraint fk_client_version_has_img_set
;
alter table client_version
drop constraint fk_client_version_has_msg_set
;
alter table client_version
drop constraint fk_c_version_has_prop_set
;
alter table client_version
drop constraint fk_clnt_app_has_clnt_version
;
alter table client_version_set_item
drop constraint fk_c_vers_set_has_items
;
alter table client_version_set_item
drop constraint fk_c_vers_set_itm_is_c_vers
;
alter table company_address
drop constraint fk_company_address_country
;
alter table company_address
drop constraint fk_company_has_addresses
;
alter table company_service
drop constraint fk_company_assoc_services
;
alter table company_service
drop constraint fk_company_for_service
;
alter table company_service
drop constraint fk_company_service_image_set
;
alter table company_service
drop constraint fk_company_service_msg_set
;
alter table content_generator
drop constraint fk_pub_set_gen_has_genre
;
alter table content_generator
drop constraint fk_pub_set_gen_has_servi
;
alter table country
drop constraint fk_country_has_one_currency
;
alter table country_code
drop constraint fk_country_code_has_ctry
;
alter table country_language
drop constraint fk_country__country_l_language
;
alter table country_language
drop constraint fk_country__country_m_country
;
alter table customer
drop constraint fk_customer_ota_install
;
alter table customer
drop constraint fk_customer_has_last_session
;
alter table customer
drop constraint fk_customer_is_system_user
;
alter table customer
drop constraint fk_customer_must_language
;
alter table customer
drop constraint fk_customer_for_service
;
alter table customer_address
drop constraint fk_customer_has_address
;
alter table customer_aka
drop constraint fk_customer_has_aka
;
alter table customer_aka
drop constraint fk_service_has_customer_aka
;
alter table customer_artist
drop constraint fk_customer_artist_genre
;
alter table customer_artist
drop constraint fk_customer_artist_is_artist
;
alter table customer_artist
drop constraint fk_customer_has_artists
;
alter table customer_billing_event
drop constraint fk_billing_event_has_customer
;
alter table customer_billing_event
drop constraint fk_billing_event_has_subsptn
;
alter table customer_billing_event
drop constraint fk_is_customer_billing_event
;
alter table customer_billing_event
drop constraint fk_cust_bill_evt_has_dev
;
alter table customer_billing_event
drop constraint fk_cust_bill_e_has_dt_device
;
alter table customer_client
drop constraint fk_client_build_has_cust_clnt
;
alter table customer_client
drop constraint fk_customer_client_has_client
;
alter table customer_client
drop constraint fk_customer_client_has_clntapp
;
alter table customer_client
drop constraint fk_customer_has_client
;
alter table customer_client_certificate
drop constraint fk_custclient_has_cert
;
alter table customer_client_cert_archive
drop constraint fk_custclntcertarc_has_id
;
alter table customer_client_distributor
drop constraint fk_custcli_dist_has_custclient
;
alter table customer_client_distributor
drop constraint fk_custcli_dist_has_dist
;
alter table customer_client_object
drop constraint fk_customer_client_has_object
;
alter table customer_client_object_log
drop constraint fk_customer_client_has_obj_log
;
alter table customer_count
drop constraint fk_customer_count_for_device
;
alter table customer_count
drop constraint fk_customer_has_count
;
alter table customer_count_live
drop constraint fk_custlive_has_count
;
alter table customer_count_live_aday
drop constraint fk_custlive_has_count_a
;
alter table customer_data
drop constraint fk_customer_has_data
;
alter table customer_distributor
drop constraint fk_cust_can_use_distrib
;
alter table customer_distributor
drop constraint fk_disributor_allows_cust
;
alter table customer_domain
drop constraint fk_customer_has_cert
;
alter table customer_genre
drop constraint fk_customer_genre_is_genre
;
alter table customer_genre
drop constraint fk_customer_has_genres
;
alter table customer_info
drop constraint fk_artist_set_has_cust_info
;
alter table customer_info
drop constraint fk_customer_info_editor_note
;
alter table customer_info
drop constraint fk_customer_has_image_set
;
alter table customer_info
drop constraint fk_customer_has_story
;
alter table customer_info
drop constraint fk_customer_has_story_set
;
alter table customer_info
drop constraint fk_customer_has_info
;
alter table customer_info
drop constraint fk_customer_rec_artists
;
alter table customer_info
drop constraint fk_customer_recommend_cust
;
alter table customer_info
drop constraint fk_customer_rec_playlists
;
alter table customer_info
drop constraint fk_customer_recommend_rel
;
alter table customer_info
drop constraint fk_cust_rec_story_set
;
alter table customer_info
drop constraint fk_customer_rec_tracks
;
alter table customer_info
drop constraint fk_customer_related_custs
;
alter table customer_info
drop constraint fk_customer_similar_custs
;
alter table customer_info
drop constraint fk_cust_set_has_cust_info
;
alter table customer_info
drop constraint fk_playlist_set_has_cust_info
;
alter table customer_info
drop constraint fk_rel_set_has_cust_info
;
alter table customer_info
drop constraint fk_track_set_has_cust_info
;
alter table customer_kept_track
drop constraint fk_cust_kept_track_has_cust
;
alter table customer_kept_track
drop constraint fk_cust_kept_track_has_track
;
alter table customer_limit
drop constraint fk_customer_has_limits
;
alter table customer_list_item
drop constraint fk_customer_list_item_is_cs
;
alter table customer_list_item
drop constraint fk_customer_list_has_items
;
alter table customer_list_lang
drop constraint fk_cust_list_has_langs
;
alter table customer_list_lang
drop constraint fk_cust_list_lang_has_lang
;
alter table customer_logger
drop constraint fk_customer_logger_fo_customer
;
alter table customer_mail
drop constraint fk_cust_mail_from_cust
;
alter table customer_mail
drop constraint fk_cust_mail_is_reply_to
;
alter table customer_mail
drop constraint fk_mail_is_cust_mail
;
alter table customer_person
drop constraint fk_customer_is_person
;
alter table customer_playlist
drop constraint fk_customer_has_playlists
;
alter table customer_playlist
drop constraint fk_customer_playlist_genre
;
alter table customer_playlist
drop constraint fk_customer_uses_playlist
;
alter table customer_preference
drop constraint fk_customer_avatar_image
;
alter table customer_preference
drop constraint fk_customer_favourite_genre
;
alter table customer_preference
drop constraint fk_customer_has_preference
;
alter table customer_preference
drop constraint fk_trk_set_has_profile_c_pref
;
alter table customer_promotion
drop constraint fk_custpromo_has_serv_sub
;
alter table customer_queue
drop constraint fk_custclient_has_queue
;
alter table customer_queue_archive
drop constraint fk_custclntarch_has_queuearch
;
alter table customer_release
drop constraint fk_customer_has_releases
;
alter table customer_release
drop constraint fk_customer_release_genre
;
alter table customer_release
drop constraint fk_customer_rel_is_release
;
alter table customer_searches
drop constraint fk_customer_did_searches
;
alter table customer_searches
drop constraint fk_customer_searches_artist
;
alter table customer_searches
drop constraint fk_customer_searches_cust
;
alter table customer_searches
drop constraint fk_customer_searches_playlist
;
alter table customer_searches
drop constraint fk_customersearches_release
;
alter table customer_searches
drop constraint fk_customer_searches_track
;
alter table customer_session
drop constraint fk_cust_session_has_ccode
;
alter table customer_session
drop constraint fk_cust_sess_has_cust_client
;
alter table customer_session
drop constraint fk_cust_session_has_net_code
;
alter table customer_session
drop constraint fk_session_for_customer
;
alter table customer_session
drop constraint fk_session_for_device
;
alter table customer_session
drop constraint fk_session_for_operator
;
alter table customer_session
drop constraint fk_session_for_service
;
alter table customer_session
drop constraint fk_session_in_country
;
alter table customer_session
drop constraint fk_session_in_currency
;
alter table customer_session
drop constraint fk_session_in_lang
;
alter table customer_set
drop constraint fk_customer_set_editor_note
;
alter table customer_set_item
drop constraint fk_cust_set_item_is_cust
;
alter table customer_set_item
drop constraint fk_cust_set_item_editor_note
;
alter table customer_set_item
drop constraint fk_customer_set_has_customers
;
alter table customer_set_lang
drop constraint fk_cust_set_has_langs
;
alter table customer_set_lang
drop constraint fk_cust_set_lang_has_lang
;
alter table customer_set_lang
drop constraint fk_cust_s_lang_has_image_set
;
alter table customer_sim
drop constraint fk_cust_sim_has_ccode
;
alter table customer_sim
drop constraint fk_cust_sim_has_customer
;
alter table customer_sim
drop constraint fk_cust_sim_has_net_code
;
alter table customer_store
drop constraint fk_custclient_has_store
;
alter table customer_store_archive
drop constraint fk_custclntarch_has_storearch
;
alter table customer_subscription
drop constraint fk_customer_has_subscriptions
;
alter table customer_subscription
drop constraint fk_customersub_is_subscription
;
alter table customer_subscription
drop constraint fk_customer_refers_to_errmsg
;
alter table customer_to_customer
drop constraint fk_customer_refersto_customers
;
alter table customer_to_customer
drop constraint fk_customer_genre_genre
;
alter table customer_to_customer
drop constraint fk_referred_cust_is_customer
;
alter table customer_to_customer_request
drop constraint fk_c_to_c_req_has_customer
;
alter table customer_to_customer_request
drop constraint fk_c_to_c_req_has_other_cust
;
alter table customer_track
drop constraint fk_customer_has_tracks
;
alter table customer_track
drop constraint fk_customer_purch_track
;
alter table customer_track
drop constraint fk_customer_track_genre
;
alter table customer_track
drop constraint fk_customer_track_is_track
;
alter table customer_track_store
drop constraint fk_cust_trk_store_has_custclnt
;
alter table device
drop constraint fk_device_manufact_company
;
alter table device
drop constraint fk_device_has_image_set
;
alter table device
drop constraint fk_device_has_message_set
;
alter table device
drop constraint fk_device_has_prop_set
;
alter table device_count
drop constraint fk_device_count_for_country
;
alter table device_count
drop constraint fk_device_count_for_distrib
;
alter table device_count
drop constraint fk_device_count_for_operator
;
alter table device_count
drop constraint fk_device_count_for_service
;
alter table device_count
drop constraint fk_device_has_count
;
alter table device_data
drop constraint fk_device_data_for_service
;
alter table device_data
drop constraint fk_device_lastbuy_customer
;
alter table device_data
drop constraint fk_device_lastplay_customer
;
alter table device_data
drop constraint fk_device_lastsearch_customer
;
alter table device_data
drop constraint fk_device_has_data
;
alter table device_exception_config
drop constraint fk_device_has_device_exception
;
alter table device_exception_config
drop constraint fk_device_has_exception
;
alter table device_file_type
drop constraint fk_devicefiletype_is_filetype
;
alter table device_file_type
drop constraint fk_device_has_file_types
;
alter table device_set
drop constraint fk_device_has_editor_note
;
alter table device_set_item
drop constraint fk_device_set_item_is_device
;
alter table device_set_item
drop constraint fk_device_set_item_ed_note
;
alter table device_set_item
drop constraint fk_device_set_has_items
;
alter table distributor
drop constraint fk_distributes_to_country
;
alter table distributor
drop constraint fk_distributes_to_region
;
alter table distributor
drop constraint fk_distributor_is_company
;
alter table editor_note
drop constraint fk_editor_note_cre_user
;
alter table editor_note
drop constraint fk_editor_note_mod_user
;
alter table editor_note
drop constraint fk_service_has_editor_notes
;
alter table editor_note_lang
drop constraint fk_editor_note_for_lang
;
alter table editor_note_lang
drop constraint fk_editor_note_has_langs
;
alter table editor_relate
drop constraint fk_editor_relate_cre_user
;
alter table editor_relate
drop constraint fk_editor_relate_artist_set
;
alter table editor_relate
drop constraint fk_editor_relate_cust_set
;
alter table editor_relate
drop constraint fk_editor_relate_rel_set
;
alter table editor_relate
drop constraint fk_editor_relate_story_set
;
alter table editor_relate
drop constraint fk_editor_relate_track_set
;
alter table editor_relate
drop constraint fk_editor_relate_mod_user
;
alter table editor_relate
drop constraint fk_editor_has_many_relates
;
alter table event
drop constraint fk_customer_has_event
;
alter table event
drop constraint fk_customer_event_is_type
;
alter table event
drop constraint fk_event_service_f_service
;
alter table event
drop constraint fk_session_has_events
;
alter table event_obj
drop constraint fk_event_has_objects
;
alter table event_type_set_item
drop constraint fk_evt_typ_set_itm_in_set
;
alter table event_type_set_item
drop constraint fk_evt_t_set_itm_is_evt_t
;
alter table event_val
drop constraint fk_event_has_values
;
alter table exception_config
drop constraint fk_exception_has_event_type
;
alter table exception_config_event
drop constraint fk_exception_caused_by_event
;
alter table exception_config_event
drop constraint fk_except_event_has_except
;
alter table exception_config_set_item
drop constraint fk_expt_set_itm_in_expt_set
;
alter table exception_config_set_item
drop constraint fk_excpt_set_itm_is_excpt
;
alter table external_error_map
drop constraint fk_external_external__service
;
alter table external_error_map
drop constraint fk_external_maps_to_essage
;
alter table genre_grouping
drop constraint fk_genre_is_child_genre
;
alter table genre_grouping
drop constraint fk_genre_is_prim_genre
;
alter table genre_set
drop constraint fk_genre_set_has_editor_note
;
alter table genre_set_item
drop constraint fk_genre_set_item_is_genre
;
alter table genre_set_item
drop constraint fk_genre_set_item_editor_note
;
alter table genre_set_item
drop constraint fk_genre_set_has_items
;
alter table help_article
drop constraint fk_help_art_has_key
;
alter table help_article
drop constraint fk_help_art_has_body_mess
;
alter table help_article
drop constraint fk_help_art_has_label_mess
;
alter table help_article
drop constraint fk_hlp_art_has_title_mess
;
alter table help_article_set_item
drop constraint fk_help_art_is_ste_itm
;
alter table help_article_set_item
drop constraint fk_help_art_set_has_items
;
alter table help_article_set_item
drop constraint fk_hlp_art_set_itm_is_key
;
alter table help_category
drop constraint fk_hlp_cat_has_hlp_art_set
;
alter table help_category
drop constraint fk_help_cat_has_key
;
alter table help_category
drop constraint fk_elp_cathas_title_mess
;
alter table help_category_set_item
drop constraint fk_help_cat_is_set_item
;
alter table help_category_set_item
drop constraint fk_help_cat_set_has_items
;
alter table help_category_set_item
drop constraint fk_hlp_cat_set_itm_has_key
;
alter table help_event_type_article
drop constraint fk_hlp_e_t_arti_has_art_set
;
alter table help_event_type_article
drop constraint fk_hlp_e_t_art_has_c_vers
;
alter table help_event_type_article
drop constraint fk_hlp_e_t_art_has_device
;
alter table help_event_type_article
drop constraint fk_hlp_e_t_art_has_service
;
alter table help_message_lang
drop constraint fk_help_message_has_langs
;
alter table help_message_lang
drop constraint fk_hlp_mess_lg_has_lang
;
alter table image_file
drop constraint fk_image_file_is_filetype
;
alter table image_file
drop constraint fk_image_has_file
;
alter table image_list_item
drop constraint fk_image_list_item_is_set
;
alter table image_list_item
drop constraint fk_image_list_has_items
;
alter table image_set
drop constraint fk_image_set_has_editor_note
;
alter table image_set_item
drop constraint fk_image_set_item_is_image
;
alter table image_set_item
drop constraint fk_image_set_item_editor_note
;
alter table image_set_item
drop constraint fk_image_set_has_item
;
alter table language
drop constraint fk_language_default_lang
;
alter table language
drop constraint fk_language_has_image_set
;
alter table language_lang
drop constraint fk_language_lang_has_language
;
alter table language_lang
drop constraint fk_language_lang_has_viewable
;
alter table language_swear
drop constraint fk_stopword_for_language
;
alter table mail
drop constraint fk_mail_from_customer
;
alter table mail_attachment
drop constraint fk_mail_att_is_release
;
alter table mail_attachment
drop constraint fk_mail_attachment_is_artist
;
alter table mail_attachment
drop constraint fk_mail_att_is_customer
;
alter table mail_attachment
drop constraint fk_mail_att_is_playlist
;
alter table mail_attachment
drop constraint fk_mail_att_is_track
;
alter table mail_attachment
drop constraint fk_mail_has_attachments
;
alter table message
drop constraint fk_message_has_message_key
;
alter table message_lang
drop constraint fk_message_lang_for_lang
;
alter table message_lang
drop constraint fk_message_has_langs
;
alter table message_set_item
drop constraint fk_message_set_item_has_key
;
alter table message_set_item
drop constraint fk_message_item_is_message
;
alter table message_set_item
drop constraint fk_message_has_items
;
alter table network_code
drop constraint fk_network_code_has_ctry_code
;
alter table network_code
drop constraint fk_network_code_has_operator
;
alter table object_log
drop constraint fk_obj_log_may_have_serv
;
alter table operator
drop constraint fk_operator_is_company
;
alter table operator
drop constraint fk_operator_has_parent
;
alter table operator
drop constraint fk_oper_must_prmary_country
;
alter table operator_gateway
drop constraint fk_operator_has_gateways
;
alter table ota_install
drop constraint fk_ota_install_has_clt_bld
;
alter table ota_install
drop constraint fk_ota_install_has_custr
;
alter table playlist
drop constraint fk_playlist_for_service
;
alter table playlist
drop constraint fk_customer_owns_playlist
;
alter table playlist
drop constraint fk_playlist_has_editor_note
;
alter table playlist
drop constraint fk_playlist_has_image_set
;
alter table playlist
drop constraint fk_playlist_has_primary_genre
;
alter table playlist
drop constraint fk_playlist_has_primary_art
;
alter table playlist
drop constraint fk_playlist_has_story
;
alter table playlist
drop constraint fk_playlist_has_tracks
;
alter table playlist
drop constraint fk_playlist_has_related_set
;
alter table playlist
drop constraint fk_playlist_has_similar_set
;
alter table playlist
drop constraint fk_playlist_synch_with
;
alter table playlist_aka
drop constraint fk_playlist_has_aka
;
alter table playlist_aka
drop constraint fk_service_has_playlist_aka
;
alter table playlist_count
drop constraint fk_playlist_count_for_device
;
alter table playlist_count
drop constraint fk_playlist_has_count
;
alter table playlist_count_live
drop constraint fk_pl_live_has_count
;
alter table playlist_count_live_aday
drop constraint fk_pllive_has_count_a
;
alter table playlist_data
drop constraint fk_playlist_playedby_customer
;
alter table playlist_data
drop constraint fk_playlist_ratedby_customer
;
alter table playlist_data
drop constraint fk_playlist_searchedby_cust
;
alter table playlist_data
drop constraint fk_playlist_has_data
;
alter table playlist_genre
drop constraint fk_playlist_genre_is_genre
;
alter table playlist_genre
drop constraint fk_playlist_has_genres
;
alter table playlist_list_item
drop constraint fk_playlist_list_item_is_ps
;
alter table playlist_list_item
drop constraint fk_playlist_list_has_items
;
alter table playlist_list_lang
drop constraint fk_playlist_list_has_langs
;
alter table playlist_list_lang
drop constraint fk_plyl_list_lang_has_lang
;
alter table playlist_set
drop constraint fk_playlist_set_has_genre
;
alter table playlist_set
drop constraint fk_playlist_set_editor_note
;
alter table playlist_set_item
drop constraint fk_playlist_set_has_playlists
;
alter table playlist_set_item
drop constraint fk_playlist_set_item_playlist
;
alter table playlist_set_item
drop constraint fk_playlistsetitem_editornote
;
alter table playlist_set_lang
drop constraint fk_playlist_lang_has_lang
;
alter table playlist_set_lang
drop constraint fk_playlist_set_has_langs
;
alter table playlist_set_lang
drop constraint fk_plylst_s_lang_has_image_set
;
alter table pnp_helper_job_status
drop constraint fk_pnph_job_stat_has_custcli
;
alter table pnp_helper_job_status
drop constraint fk_pnph_job_stat_has_pnph_conf
;
alter table price
drop constraint fk_price_has_edit0r_note
;
alter table price_local
drop constraint fk_price_local_for_country
;
alter table price_local
drop constraint fk_price_local_has_currency
;
alter table price_local
drop constraint fk_price_has_locale
;
alter table price_set
drop constraint fk_price_set_has_edit0r_note
;
alter table price_set_item
drop constraint fk_pricesetitem_is_price
;
alter table price_set_item
drop constraint fk_price_set_item_editor_note
;
alter table price_set_item
drop constraint fk_price_se_price_set_price_se
;
alter table promotion
drop constraint fk_promotion_has_artist_set
;
alter table promotion
drop constraint fk_promotion_has_cust_set
;
alter table promotion
drop constraint fk_promotion_has_device_set
;
alter table promotion
drop constraint fk_promotion_has_editor_note
;
alter table promotion
drop constraint fk_promotion_has_image_set
;
alter table promotion
drop constraint fk_promotion_has_message_set
;
alter table promotion
drop constraint fk_promotion_has_prices
;
alter table promotion
drop constraint fk_promotion_has_release_set
;
alter table promotion
drop constraint fk_promotion_has_story_set
;
alter table promotion
drop constraint fk_promotion_has_track_set
;
alter table promotion_count
drop constraint fk_promotion_cnt_for_artist
;
alter table promotion_count
drop constraint fk_promotion_cnt_for_cntry
;
alter table promotion_count
drop constraint fk_promotion_cnt_for_cust
;
alter table promotion_count
drop constraint fk_promotion_cnt_for_device
;
alter table promotion_count
drop constraint fk_promotion_cnt_for_distribu
;
alter table promotion_count
drop constraint fk_promotin_cnt_for_operator
;
alter table promotion_count
drop constraint fk_promotion_cnt_for_rel
;
alter table promotion_count
drop constraint fk_promotion_cnt_for_service
;
alter table promotion_count
drop constraint fk_promotion_cnt_for_track
;
alter table promotion_count
drop constraint fk_promotion_has_count
;
alter table promotion_set
drop constraint fk_promotion_set_editor_note
;
alter table promotion_set_item
drop constraint fk_promotion_set_item_promo
;
alter table promotion_set_item
drop constraint fk_promotinsetitem_editornote
;
alter table promotion_set_item
drop constraint fk_promotion_set_has_items
;
alter table property
drop constraint fk_property_has_key
;
alter table property_set_item
drop constraint fk_property_set_has_items
;
alter table property_set_item
drop constraint fk_prop_set_item_has_key
;
alter table property_set_item
drop constraint fk_prop_set_item_is_prop
;
alter table publish_set
drop constraint fk_publish_set_has_artist_set
;
alter table publish_set
drop constraint fk_pub_set_has_cust_set
;
alter table publish_set
drop constraint fk_pub_set_has_playlist_set
;
alter table publish_set
drop constraint fk_pub_set_has_pub_artist_set
;
alter table publish_set
drop constraint fk_pub_set_has_pub_c_set
;
alter table publish_set
drop constraint fk_pub_set_has_pub_pl_set
;
alter table publish_set
drop constraint fk_pub_set_has_pub_rel_set
;
alter table publish_set
drop constraint fk_pub_set_has_pub_s_set
;
alter table publish_set
drop constraint fk_pub_set_has_pub_trk_set
;
alter table publish_set
drop constraint fk_pub_set_has_release_set
;
alter table publish_set
drop constraint fk_pub_set_has_story_set
;
alter table publish_set
drop constraint fk_pub_set_has_track_set
;
alter table purchased
drop constraint fk_customer_has_purchases
;
alter table purchased
drop constraint fk_purchased_at_price
;
alter table purchased
drop constraint fk_purchased_from_distrib
;
alter table purchased
drop constraint fk_purchased_in_event
;
alter table purchased
drop constraint fk_purchased_in_service
;
alter table purchased
drop constraint fk_purchased_in_session
;
alter table purchased
drop constraint fk_purchased_release
;
alter table purchased
drop constraint fk_purchased_track
;
alter table purchased
drop constraint fk_purchased_under_promo
;
alter table recommend_request_queue
drop constraint fk_recom_req_q_has_customer
;
alter table recommend_request_queue
drop constraint fk_recom_req_q_has_service
;
alter table region_country
drop constraint fk_region_c_region_co_country
;
alter table region_country
drop constraint fk_region_has_countries
;
alter table release
drop constraint fk_release_first_country
;
alter table release
drop constraint fk_release_has_editor_note
;
alter table release
drop constraint fk_released_has_one_artist_set
;
alter table release
drop constraint fk_release_has_one_artset
;
alter table release
drop constraint fk_release_primary_image
;
alter table release
drop constraint fk_release_has_record_label
;
alter table release
drop constraint fk_release_has_specific_price
;
alter table release
drop constraint fk_release_may_have_playlist
;
alter table release
drop constraint fk_release_has_primary_story
;
alter table release
drop constraint fk_release_has_sleeve_notes
;
alter table release
drop constraint fk_release_has_story_set
;
alter table release
drop constraint fk_release_has_primary_artist
;
alter table release
drop constraint fk_release_has_primary_genre
;
alter table release
drop constraint fk_release_related_releases
;
alter table release
drop constraint fk_release_similar_releases
;
alter table release_aka
drop constraint fk_release_has_aka
;
alter table release_count
drop constraint fk_release_cnt_for_country
;
alter table release_count
drop constraint fk_release_count_for_device
;
alter table release_count
drop constraint fk_release_count_for_distrib
;
alter table release_count
drop constraint fk_release_count_for_operator
;
alter table release_count
drop constraint fk_release_count_for_service
;
alter table release_count
drop constraint fk_release_has_count
;
alter table release_count_live
drop constraint fk_rc_live_has_count
;
alter table release_count_live
drop constraint fk_rc_live_has_service
;
alter table release_count_live_aday
drop constraint fk_rclive_has_count_a
;
alter table release_count_live_aday
drop constraint fk_rclive_has_service_a
;
alter table release_data
drop constraint fk_release_data_for_service
;
alter table release_data
drop constraint fk_release_bought_by_cust
;
alter table release_data
drop constraint fk_release_played_by_cust
;
alter table release_data
drop constraint fk_release_rated_by_cust
;
alter table release_data
drop constraint fk_release_searched_by_cust
;
alter table release_data
drop constraint fk_release_has_data
;
alter table release_genre
drop constraint fk_release_genre_is_genre
;
alter table release_genre
drop constraint fk_release_has_genres
;
alter table release_list_item
drop constraint fk_release_list_item_is_rs
;
alter table release_list_item
drop constraint fk_release_list_has_items
;
alter table release_list_lang
drop constraint fk_release_list_has_langs
;
alter table release_list_lang
drop constraint fk_rel_list_lang_has_lang
;
alter table release_set
drop constraint fk_release_set_has_genre
;
alter table release_set
drop constraint fk_release_set_has_editor_note
;
alter table release_set_item
drop constraint fk_release_set_item_is_release
;
alter table release_set_item
drop constraint fk_release_set_item_editornote
;
alter table release_set_item
drop constraint fk_release_has_item
;
alter table release_set_lang
drop constraint fk_rel_set_has_langs
;
alter table release_set_lang
drop constraint fk_rel_set_lang_has_lang
;
alter table release_set_lang
drop constraint fk_rel_s_lang_has_image_set
;
alter table release_track
drop constraint fk_release_has_tracks
;
alter table release_track
drop constraint fk_release_track_is_track
;
alter table scheduled_activity_log
drop constraint fk_sched_act_was_logged
;
alter table server_version
drop constraint fk_serv_vers_has_c_vers_set
;
alter table server_version
drop constraint fk_version_has_release_notes
;
alter table server_version
drop constraint fk_version_has_device_set
;
alter table server_version
drop constraint fk_version_has_image_set
;
alter table server_version
drop constraint fk_version_has_message_set
;
alter table service
drop constraint fk_serv_has_libr_story_set
;
alter table service
drop constraint fk_service_has_seed_cust
;
alter table service
drop constraint fk_service_has_story_set
;
alter table service
drop constraint fk_service_service_i_server_v
;
alter table service
drop constraint fk_service_has_chart_set
;
alter table service
drop constraint fk_service_has_def_cont_sub
;
alter table service
drop constraint fk_service_has_def_payg_sub
;
alter table service
drop constraint fk_service_has_device_set
;
alter table service
drop constraint fk_service_has_genre_set
;
alter table service
drop constraint fk_service_has_message_set
;
alter table service
drop constraint fk_service_has_promo_set
;
alter table service
drop constraint fk_service_has_artist_list
;
alter table service
drop constraint fk_service_has_customer_list
;
alter table service
drop constraint fk_service_has_image_list
;
alter table service
drop constraint fk_service_for_operator
;
alter table service
drop constraint fk_service_has_owner_company
;
alter table service
drop constraint fk_service_has_playlist_list
;
alter table service
drop constraint fk_service_has_price_set
;
alter table service
drop constraint fk_service_primary_country
;
alter table service
drop constraint fk_service_primary_distrib
;
alter table service
drop constraint fk_service_primary_language
;
alter table service
drop constraint fk_service_for_property_set
;
alter table service
drop constraint fk_service_has_release_list
;
alter table service
drop constraint fk_service_has_story_list
;
alter table service
drop constraint fk_service_has_terms_story
;
alter table service
drop constraint fk_service_has_track_list
;
alter table service_artist
drop constraint fk_artist_is_on_service
;
alter table service_artist
drop constraint fk_cust_set_has_most_played
;
alter table service_artist
drop constraint fk_service_contains_artist
;
alter table service_artist
drop constraint fk_serv_artist_has_rec_art_set
;
alter table service_billing_event
drop constraint fk_is_service_billing_event
;
alter table service_billing_event
drop constraint fk_srv_bill_evnt_has_company
;
alter table service_billing_event
drop constraint fk_srv_bill_evnt_has_service
;
alter table service_billing_event
drop constraint fk_ref_cust_billing_event
;
alter table service_count
drop constraint fk_service_count_for_device
;
alter table service_count
drop constraint fk_service_has_count
;
alter table service_data
drop constraint fk_service_lastplay_cust
;
alter table service_data
drop constraint fk_service_lastbuy_cust
;
alter table service_data
drop constraint fk_service_lastsearch_cust
;
alter table service_data
drop constraint fk_service_local_has_data
;
alter table service_distributor
drop constraint fk_service_distrib_is_distrib
;
alter table service_distributor
drop constraint fk_service_has_distributors
;
alter table service_language
drop constraint fk_service_language_is_lang
;
alter table service_language
drop constraint fk_service_has_languages
;
alter table service_license
drop constraint fk_service_has_license
;
alter table service_queue
drop constraint fk_service_has_queue
;
alter table service_queue_archive
drop constraint fk_service_has_queuearch
;
alter table service_release
drop constraint fk_release_appears_in_serv
;
alter table service_release
drop constraint fk_service_has_release
;
alter table service_release
drop constraint fk_servrel_has_recom_rel_set
;
alter table service_subscription
drop constraint fk_service_has_subscription
;
alter table service_track
drop constraint fk_service_has_track
;
alter table service_track
drop constraint fk_track_exists_on_service
;
alter table sms_campaign
drop constraint fk_sms_camp_has_event_type
;
alter table sms_campaign
drop constraint fk_sms_camp_has_sched_activity
;
alter table sms_campaign
drop constraint fk_sms_camp_has_service
;
alter table sms_event
drop constraint fk_smsevent_has_event_typeid
;
alter table sms_status
drop constraint fk_sms_status_customer
;
alter table sms_status
drop constraint fk_sms_status_service
;
alter table story
drop constraint fk_story_created_by_user
;
alter table story
drop constraint fk_story_has_device_set
;
alter table story
drop constraint fk_story_has_primary_genre
;
alter table story
drop constraint fk_story_has_edit0r_note
;
alter table story
drop constraint fk_story_has_image_set
;
alter table story
drop constraint fk_story_has_image
;
alter table story
drop constraint fk_story_has_artist_set
;
alter table story
drop constraint fk_story_has_customer_set
;
alter table story
drop constraint fk_story_has_playlist_set
;
alter table story
drop constraint fk_story_has_release_set
;
alter table story
drop constraint fk_story_related_story_set
;
alter table story
drop constraint fk_story_has_track_set
;
alter table story
drop constraint fk_story_similar_story_set
;
alter table story
drop constraint fk_story_modified_by_user
;
alter table story_lang
drop constraint fk_story_for_language
;
alter table story_lang
drop constraint fk_story_lang_has_image
;
alter table story_lang
drop constraint fk_story_has_languages
;
alter table story_list_item
drop constraint fk_story_list_item_is_ss
;
alter table story_list_item
drop constraint fk_story_list_has_items
;
alter table story_list_lang
drop constraint fk_story_list_has_langs
;
alter table story_list_lang
drop constraint fk_stry_list_lg_has_lg
;
alter table story_set
drop constraint fk_story_set_has_image_set
;
alter table story_set
drop constraint fk_story_set_has_editor_note
;
alter table story_set_item
drop constraint fk_story_set_item_is_story
;
alter table story_set_item
drop constraint fk_story_set_item_editor_note
;
alter table story_set_item
drop constraint fk_story_set_has_stories
;
alter table story_set_lang
drop constraint fk_story_set_has_langs
;
alter table story_set_lang
drop constraint fk_stry_set_lg_has_lg
;
alter table system_user_service
drop constraint fk_sys_user_serv_has_role
;
alter table system_user_service
drop constraint fk_user_for_services
;
alter table system_user_service
drop constraint fk_user_for_service
;
alter table system_user_test_options
drop constraint fk_sys_user_has_test_options
;
alter table track
drop constraint fk_track_has_primary_artist
;
alter table track
drop constraint fk_track_member_of_release
;
alter table track
drop constraint fk_track_has_one_artist_set
;
alter table track
drop constraint fk_track_has_editor_note
;
alter table track
drop constraint fk_track_has_art_set
;
alter table track
drop constraint fk_track_has_lyrics_story
;
alter table track
drop constraint fk_track_has_primary_genre
;
alter table track
drop constraint fk_track_has_primary_image
;
alter table track
drop constraint fk_track_has_primary_story
;
alter table track
drop constraint fk_track_has_record_label
;
alter table track
drop constraint fk_track_related_trackset
;
alter table track
drop constraint fk_track_similar_trackset
;
alter table track
drop constraint fk_track_has_specific_price
;
alter table track
drop constraint fk_track_has_story_set
;
alter table track
drop constraint fk_track_sideloaded_by_cust
;
alter table track_aka
drop constraint fk_track_has_aka
;
alter table track_count
drop constraint fk_track_count_for_country
;
alter table track_count
drop constraint fk_track_count_for_device
;
alter table track_count
drop constraint fk_track_count_for_distrib
;
alter table track_count
drop constraint fk_track_count_for_operator
;
alter table track_count
drop constraint fk_track_count_for_service
;
alter table track_count
drop constraint fk_track_has_count
;
alter table track_count_live
drop constraint fk_tracklive_has_count
;
alter table track_count_live
drop constraint fk_tracklive_has_service
;
alter table track_count_live_aday
drop constraint fk_tracklive_has_count_a
;
alter table track_count_live_aday
drop constraint fk_tracklive_has_service_a
;
alter table track_data
drop constraint fk_track_data_for_service
;
alter table track_data
drop constraint fk_track_bought_by_customer
;
alter table track_data
drop constraint fk_track_playedby_customer
;
alter table track_data
drop constraint fk_track_ratedby_customer
;
alter table track_data
drop constraint fk_track_last_search_cust
;
alter table track_data
drop constraint fk_track_has_data
;
alter table track_file
drop constraint fk_track_file_from_distrib
;
alter table track_file
drop constraint fk_track_file_is_filetype
;
alter table track_file
drop constraint fk_track_has_many_files
;
alter table track_genre
drop constraint fk_track_genre_is_genre
;
alter table track_genre
drop constraint fk_track_has_genres
;
alter table track_list_item
drop constraint fk_track_list_has_items
;
alter table track_list_item
drop constraint fk_track_list_item_is_ts
;
alter table track_list_lang
drop constraint fk_track_list_has_langs
;
alter table track_list_lang
drop constraint fk_trk_lst_lg_has_lang
;
alter table track_rights
drop constraint fk_track_has_many_rights
;
alter table track_rights
drop constraint fk_track_rights_for_country
;
alter table track_rights
drop constraint fk_track_rights_for_distrib
;
alter table track_set
drop constraint fk_track_set_has_genre
;
alter table track_set
drop constraint fk_track_set_has_editor_note
;
alter table track_set_item
drop constraint fk_track_set_item_is_track
;
alter table track_set_item
drop constraint fk_track_set_item_editor_note
;
alter table track_set_item
drop constraint fk_track_set_has_items
;
alter table track_set_lang
drop constraint fk_track_set_has_langs
;
alter table track_set_lang
drop constraint fk_trk_set_lg_has_lang
;
alter table track_set_lang
drop constraint fk_trk_s_lang_has_image_set
;
alter table user_role_privilege
drop constraint fk_priv_used_by_user_role
;
alter table user_role_privilege
drop constraint fk_user_role_has_privs
;
alter table wmdrm_metering
drop constraint fk_wmdrm_met_has_client
;
alter table wmdrm_metering
drop constraint fk_wmdrm_met_has_custclient
;
alter table wmdrm_metering_tracks
drop constraint fk_wmdrm_mett_has_track
;
alter table wmdrm_metering_tracks
drop constraint fk_wmdrm_mett_has_wmdrm
;
alter table artist
add constraint fk_artist_born_in_country foreign key (born_in_country)
references country (country)
;
alter table artist
add constraint fk_artist_first_rel_country foreign key (first_release_country)
references country (country)
;
alter table artist
add constraint fk_artist_has_biography_story foreign key (biography_story_id)
references story (id)
;
alter table artist
add constraint fk_artist_has_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table artist
add constraint fk_artist_celebrity_playlist foreign key (celebrity_playlist_id)
references playlist (id)
;
alter table artist
add constraint fk_artist_contemp_artists foreign key (artist_contemporaries_set_id)
references artist_set (id)
on delete set null
;
alter table artist
add constraint fk_artist_has_followers foreign key (artist_followers_set_id)
references artist_set (id)
on delete set null
;
alter table artist
add constraint fk_artist_has_image_set foreign key (image_set_id)
references image_set (id)
;
alter table artist
add constraint fk_artist_infulenced_by foreign key (artist_influencers_set_id)
references artist_set (id)
on delete set null
;
alter table artist
add constraint fk_artist_has_primary_image foreign key (primary_image_id)
references image (id)
;
alter table artist
add constraint fk_artist_has_primary_story foreign key (primary_story_id)
references story (id)
on delete set null
;
alter table artist
add constraint fk_artist_has_article_set foreign key (story_set_id)
references story_set (id)
on delete set null
;
alter table artist
add constraint fk_artist_has_track_set foreign key (track_set_id)
references track_set (id)
;
alter table artist
add constraint fk_artist_has_primary_genre foreign key (primary_genre_id)
references primary_genre (id)
;
alter table artist_aka
add constraint fk_artist_has_aka foreign key (artist_id)
references artist (id)
on delete cascade
;
alter table artist_count
add constraint fk_artist_count_for_country foreign key (country)
references country (country)
;
alter table artist_count
add constraint fk_artist_count_for_device foreign key (device_id)
references device (id)
;
alter table artist_count
add constraint fk_artist_count_for_distrib foreign key (distributor_id)
references distributor (id)
;
alter table artist_count
add constraint fk_artist_count_for_operator foreign key (operator_id)
references operator (id)
on delete cascade
;
alter table artist_count
add constraint fk_artist_count_for_service foreign key (service_id)
references service (id)
on delete cascade
;
alter table artist_count
add constraint fk_artist_has_count foreign key (artist_id)
references artist (id)
on delete cascade
;
alter table artist_count_live
add constraint fk_artlive_has_count foreign key (artist_id)
references artist (id)
on delete cascade
;
alter table artist_count_live
add constraint fk_artlive_has_service foreign key (service_id)
references service (id)
on delete cascade
;
alter table artist_count_live_aday
add constraint fk_artlive_has_count_a foreign key (artist_id)
references artist (id)
on delete cascade
;
alter table artist_count_live_aday
add constraint fk_artlive_has_service_a foreign key (service_id)
references service (id)
on delete cascade
;
alter table artist_data
add constraint fk_artist_data_for_service foreign key (service_id)
references service (id)
on delete cascade
;
alter table artist_data
add constraint fk_artist_has_one_data foreign key (artist_id)
references artist (id)
on delete cascade
;
alter table artist_data
add constraint fk_artist_boughtby_customer foreign key (last_buy_customer_id)
references customer (id)
;
alter table artist_data
add constraint fk_artist_playedby_customer foreign key (last_play_customer_id)
references customer (id)
;
alter table artist_data
add constraint fk_artist_ratedby_customer foreign key (last_rating_customer_id)
references customer (id)
;
alter table artist_data
add constraint fk_artist_lastsearch_cust foreign key (last_search_customer_id)
references customer (id)
;
alter table artist_genre
add constraint fk_artist_genre_is_genre foreign key (genre_id)
references genre (id)
;
alter table artist_genre
add constraint fk_artist_has_genres foreign key (artist_id)
references artist (id)
on delete cascade
;
alter table artist_list_item
add constraint fk_artist_list_item_artist_set foreign key (artist_set_id)
references artist_set (id)
;
alter table artist_list_item
add constraint fk_artist_list_has_items foreign key (artist_list_id)
references artist_list (id)
on delete cascade
;
alter table artist_list_lang
add constraint fk_artist_list_has_langs foreign key (artist_list_id)
references artist_list (id)
;
alter table artist_list_lang
add constraint fk_art_list_lang_has_lang foreign key (language)
references language (language)
;
alter table artist_set
add constraint fk_artist_set_has_genre foreign key (primary_genre_id)
references primary_genre (id)
;
alter table artist_set
add constraint fk_artist_set_has_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table artist_set_item
add constraint fk_artist_set_is_artist foreign key (artist_id)
references artist (id)
on delete cascade
;
alter table artist_set_item
add constraint fk_artist_set_item_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table artist_set_item
add constraint fk_artist_set_has_artists foreign key (artist_set_id)
references artist_set (id)
on delete cascade
;
alter table artist_set_lang
add constraint fk_artist_set_has_langs foreign key (artist_set_id)
references artist_set (id)
;
alter table artist_set_lang
add constraint fk_artist_s_lang_has_lang foreign key (language)
references language (language)
;
alter table artist_set_lang
add constraint fk_artist_s_lang_has_image_set foreign key (image_set_id)
references image_set (id)
;
alter table billing_group_task
add constraint fk_bill_gtask_has_b_event foreign key (billing_event_id)
references billing_event (id)
;
alter table billing_group_task
add constraint fk_bill_gtask_has_srv_subs foreign key (service_subscription_id)
references service_subscription (id)
;
alter table chart
add constraint fk_chart_has_cur_release foreign key (current_release_id)
references chart_release (id)
;
alter table chart
add constraint fk_chart_has_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table chart
add constraint fk_chart_has_genre foreign key (primary_genre_id)
references primary_genre (id)
;
alter table chart
add constraint fk_chart_has_image_set foreign key (image_set_id)
references image_set (id)
;
alter table chart
add constraint fk_chart_origin_country foreign key (country_of_origin)
references country (country)
;
alter table chart_release
add constraint fk_chart_has_releases foreign key (chart_id)
references chart (id)
on delete cascade
;
alter table chart_release
add constraint fk_chart_rel_has_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table chart_release_item
add constraint fk_chart_rel_is_artist foreign key (artist_id)
references artist (id)
on delete cascade
;
alter table chart_release_item
add constraint fk_chart_rel_is_cust foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table chart_release_item
add constraint fk_chart_rel_is_playlist foreign key (playlist_id)
references playlist (id)
on delete cascade
;
alter table chart_release_item
add constraint fk_chart_rel_is_relase foreign key (release_id)
references release (id)
on delete cascade
;
alter table chart_release_item
add constraint fk_chart_rel_is_track foreign key (track_id)
references track (id)
on delete cascade
;
alter table chart_release_item
add constraint fk_chart_rel_item_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table chart_release_item
add constraint fk_chart_has_items foreign key (chart_release_id)
references chart_release (id)
on delete cascade
;
alter table chart_set
add constraint fk_chart_set_has_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table chart_set_item
add constraint fk_chart_set_item_is_chart foreign key (chart_id)
references chart (id)
on delete cascade
;
alter table chart_set_item
add constraint fk_chart_set_item_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table chart_set_item
add constraint fk_chart_set_has_item foreign key (chart_set_id)
references chart_set (id)
;
alter table chart_set_lang
add constraint fk_cset_lang_has_chart_set foreign key (chart_set_id)
references chart_set (id)
;
alter table chart_set_lang
add constraint fk_cset_lang_has_image_set foreign key (image_set_id)
references image_set (id)
;
alter table chart_set_lang
add constraint fk_cset_lang_has_language foreign key (language)
references language (language)
;
alter table client
add constraint fk_client_has_device foreign key (device_id)
references device (id)
;
alter table client_build
add constraint fk_client_b_has_default_lang foreign key (default_language)
references language (language)
;
alter table client_build
add constraint fk_client_build_has_device foreign key (device_id)
references device (id)
;
alter table client_build
add constraint fk_client_b_has_image_set foreign key (image_set_id)
references image_set (id)
;
alter table client_build
add constraint fk_client_build_has_service foreign key (service_id)
references service (id)
;
alter table client_build
add constraint fk_client_build_has_version foreign key (client_version_id)
references client_version (id)
;
alter table client_build
add constraint fk_c_build_sup_end_message foreign key (support_end_message_set_id)
references message_set (id)
;
alter table client_build_event_type
add constraint fk_c_b_evt_type_is_evt_type foreign key (event_type_id)
references event_type (id)
;
alter table client_build_event_type
add constraint fk_client_build_has_events foreign key (client_build_id)
references client_build (id)
;
alter table client_build_exception_config
add constraint fk_c_build_excp_is_exception foreign key (exception_config_id)
references exception_config (id)
;
alter table client_build_exception_config
add constraint fk_client_build_has_exceptions foreign key (client_build_id)
references client_build (id)
;
alter table client_build_message
add constraint fk_client_bl_mess_has_message foreign key (message_id)
references message (id)
;
alter table client_build_message
add constraint fk_client_build_has_messages foreign key (client_build_id)
references client_build (id)
;
alter table client_build_message
add constraint fk_client_b_mess_is_key foreign key (message_key_id)
references message_key (id)
;
alter table client_build_property
add constraint fk_client_bl_prop_has_prop foreign key (property_id)
references property (id)
;
alter table client_build_property
add constraint fk_client_build_has_properties foreign key (client_build_id)
references client_build (id)
;
alter table client_build_property
add constraint fk_propkey_in_client_build foreign key (property_key_id)
references property_key (id)
;
alter table client_subscription
add constraint fk_client_subscriptn_has_mps foreign key (mps_id)
references mps (id)
;
alter table client_version
add constraint fk_client_v_has_evt_type_set foreign key (event_type_set_id)
references event_type_set (id)
;
alter table client_version
add constraint fk_c_version_has_excpt_set foreign key (exception_config_set_id)
references exception_config_set (id)
;
alter table client_version
add constraint fk_client_version_has_img_set foreign key (image_set_id)
references image_set (id)
;
alter table client_version
add constraint fk_client_version_has_msg_set foreign key (message_set_id)
references message_set (id)
;
alter table client_version
add constraint fk_c_version_has_prop_set foreign key (property_set_id)
references property_set (id)
;
alter table client_version
add constraint fk_clnt_app_has_clnt_version foreign key (client_application_id)
references client_application (id)
;
alter table client_version_set_item
add constraint fk_c_vers_set_has_items foreign key (client_version_set_id)
references client_version_set (id)
;
alter table client_version_set_item
add constraint fk_c_vers_set_itm_is_c_vers foreign key (client_version_id)
references client_version (id)
;
alter table company_address
add constraint fk_company_address_country foreign key (country)
references country (country)
;
alter table company_address
add constraint fk_company_has_addresses foreign key (company_id)
references company (id)
on delete cascade
;
alter table company_service
add constraint fk_company_assoc_services foreign key (company_id)
references company (id)
on delete cascade
;
alter table company_service
add constraint fk_company_for_service foreign key (service_id)
references service (id)
on delete cascade
;
alter table company_service
add constraint fk_company_service_image_set foreign key (image_set_id)
references image_set (id)
;
alter table company_service
add constraint fk_company_service_msg_set foreign key (message_set_id)
references message_set (id)
;
alter table content_generator
add constraint fk_pub_set_gen_has_genre foreign key (primary_genre_id)
references primary_genre (id)
;
alter table content_generator
add constraint fk_pub_set_gen_has_servi foreign key (service_id)
references service (id)
;
alter table country
add constraint fk_country_has_one_currency foreign key (currency)
references currency (currency)
;
alter table country_code
add constraint fk_country_code_has_ctry foreign key (country)
references country (country)
;
alter table country_language
add constraint fk_country__country_l_language foreign key (language)
references language (language)
;
alter table country_language
add constraint fk_country__country_m_country foreign key (country)
references country (country)
on delete cascade
;
alter table customer
add constraint fk_customer_ota_install foreign key (ota_install_id)
references ota_install (id)
;
alter table customer
add constraint fk_customer_has_last_session foreign key (last_customer_session_id)
references customer_session (id)
;
alter table customer
add constraint fk_customer_is_system_user foreign key (system_user_id)
references system_user (id)
;
alter table customer
add constraint fk_customer_must_language foreign key (language)
references language (language)
;
alter table customer
add constraint fk_customer_for_service foreign key (service_id)
references service (id)
on delete cascade
;
alter table customer_address
add constraint fk_customer_has_address foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_aka
add constraint fk_customer_has_aka foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_aka
add constraint fk_service_has_customer_aka foreign key (service_id)
references service (id)
on delete cascade
;
alter table customer_artist
add constraint fk_customer_artist_genre foreign key (customer_given_genre_id)
references genre (id)
;
alter table customer_artist
add constraint fk_customer_artist_is_artist foreign key (artist_id)
references artist (id)
;
alter table customer_artist
add constraint fk_customer_has_artists foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_billing_event
add constraint fk_billing_event_has_customer foreign key (customer_id)
references customer (id)
;
alter table customer_billing_event
add constraint fk_billing_event_has_subsptn foreign key (service_subscription_id)
references service_subscription (id)
;
alter table customer_billing_event
add constraint fk_is_customer_billing_event foreign key (billing_event_id)
references billing_event (id)
;
alter table customer_billing_event
add constraint fk_cust_bill_evt_has_dev foreign key (mobile_device_id)
references device (id)
;
alter table customer_billing_event
add constraint fk_cust_bill_e_has_dt_device foreign key (desktop_device_id)
references device (id)
;
alter table customer_client
add constraint fk_client_build_has_cust_clnt foreign key (client_build_id)
references client_build (id)
;
alter table customer_client
add constraint fk_customer_client_has_client foreign key (client_id)
references client (id)
;
alter table customer_client
add constraint fk_customer_client_has_clntapp foreign key (client_application_id)
references client_application (id)
;
alter table customer_client
add constraint fk_customer_has_client foreign key (customer_id)
references customer (id)
;
alter table customer_client_certificate
add constraint fk_custclient_has_cert foreign key (customer_client_id)
references customer_client (id)
on delete cascade
;
alter table customer_client_cert_archive
add constraint fk_custclntcertarc_has_id foreign key (customer_client_id)
references customer_client_archive (id)
on delete cascade
;
alter table customer_client_distributor
add constraint fk_custcli_dist_has_custclient foreign key (customer_client_id)
references customer_client (id)
;
alter table customer_client_distributor
add constraint fk_custcli_dist_has_dist foreign key (distributor_id)
references distributor (id)
;
alter table customer_client_object
add constraint fk_customer_client_has_object foreign key (customer_client_id)
references customer_client (id)
;
alter table customer_client_object_log
add constraint fk_customer_client_has_obj_log foreign key (customer_client_id)
references customer_client (id)
;
alter table customer_count
add constraint fk_customer_count_for_device foreign key (device_id)
references device (id)
on delete cascade
;
alter table customer_count
add constraint fk_customer_has_count foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_count_live
add constraint fk_custlive_has_count foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_count_live_aday
add constraint fk_custlive_has_count_a foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_data
add constraint fk_customer_has_data foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_distributor
add constraint fk_cust_can_use_distrib foreign key (customer_id)
references customer (id)
;
alter table customer_distributor
add constraint fk_disributor_allows_cust foreign key (distributor_id)
references distributor (id)
;
alter table customer_domain
add constraint fk_customer_has_cert foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_genre
add constraint fk_customer_genre_is_genre foreign key (genre_id)
references genre (id)
;
alter table customer_genre
add constraint fk_customer_has_genres foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_info
add constraint fk_artist_set_has_cust_info foreign key (fav_artist_set_id)
references artist_set (id)
;
alter table customer_info
add constraint fk_customer_info_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table customer_info
add constraint fk_customer_has_image_set foreign key (upload_image_set_id)
references image_set (id)
;
alter table customer_info
add constraint fk_customer_has_story foreign key (primary_story_id)
references story (id)
on delete set null
;
alter table customer_info
add constraint fk_customer_has_story_set foreign key (story_set_id)
references story_set (id)
on delete set null
;
alter table customer_info
add constraint fk_customer_has_info foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_info
add constraint fk_customer_rec_artists foreign key (recommend_artist_set_id)
references artist_set (id)
on delete set null
;
alter table customer_info
add constraint fk_customer_recommend_cust foreign key (recommend_customer_set_id)
references customer_set (id)
;
alter table customer_info
add constraint fk_customer_rec_playlists foreign key (recommend_playlist_set_id)
references playlist_set (id)
on delete set null
;
alter table customer_info
add constraint fk_customer_recommend_rel foreign key (recommend_release_set_id)
references release_set (id)
;
alter table customer_info
add constraint fk_cust_rec_story_set foreign key (recommend_story_set_id)
references story_set (id)
;
alter table customer_info
add constraint fk_customer_rec_tracks foreign key (recommend_track_set_id)
references track_set (id)
on delete set null
;
alter table customer_info
add constraint fk_customer_related_custs foreign key (related_customer_set_id)
references customer_set (id)
;
alter table customer_info
add constraint fk_customer_similar_custs foreign key (similar_customer_set_id)
references customer_set (id)
;
alter table customer_info
add constraint fk_cust_set_has_cust_info foreign key (fav_customer_set_id)
references customer_set (id)
;
alter table customer_info
add constraint fk_playlist_set_has_cust_info foreign key (fav_playlist_set_id)
references playlist_set (id)
;
alter table customer_info
add constraint fk_rel_set_has_cust_info foreign key (fav_release_set_id)
references release_set (id)
;
alter table customer_info
add constraint fk_track_set_has_cust_info foreign key (fav_track_set_id)
references track_set (id)
;
alter table customer_kept_track
add constraint fk_cust_kept_track_has_cust foreign key (customer_id)
references customer (id)
;
alter table customer_kept_track
add constraint fk_cust_kept_track_has_track foreign key (track_id)
references track (id)
;
alter table customer_limit
add constraint fk_customer_has_limits foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_list_item
add constraint fk_customer_list_item_is_cs foreign key (customer_set_id)
references customer_set (id)
;
alter table customer_list_item
add constraint fk_customer_list_has_items foreign key (customer_list_id)
references customer_list (id)
on delete cascade
;
alter table customer_list_lang
add constraint fk_cust_list_has_langs foreign key (customer_list_id)
references customer_list (id)
;
alter table customer_list_lang
add constraint fk_cust_list_lang_has_lang foreign key (language)
references language (language)
;
alter table customer_logger
add constraint fk_customer_logger_fo_customer foreign key (customer_id)
references customer (id)
;
alter table customer_mail
add constraint fk_cust_mail_from_cust foreign key (customer_id)
references customer (id)
;
alter table customer_mail
add constraint fk_cust_mail_is_reply_to foreign key (reply_mail_id)
references mail (id)
;
alter table customer_mail
add constraint fk_mail_is_cust_mail foreign key (mail_id)
references mail (id)
;
alter table customer_person
add constraint fk_customer_is_person foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_playlist
add constraint fk_customer_has_playlists foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_playlist
add constraint fk_customer_playlist_genre foreign key (customer_given_genre_id)
references genre (id)
;
alter table customer_playlist
add constraint fk_customer_uses_playlist foreign key (playlist_id)
references playlist (id)
on delete cascade
;
alter table customer_preference
add constraint fk_customer_avatar_image foreign key (avatar_image_id)
references image (id)
;
alter table customer_preference
add constraint fk_customer_favourite_genre foreign key (favourite_genre_id)
references genre (id)
;
alter table customer_preference
add constraint fk_customer_has_preference foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_preference
add constraint fk_trk_set_has_profile_c_pref foreign key (profile_track_set_id)
references track_set (id)
;
alter table customer_promotion
add constraint fk_custpromo_has_serv_sub foreign key (service_subscription_id)
references service_subscription (id)
;
alter table customer_queue
add constraint fk_custclient_has_queue foreign key (customer_client_id)
references customer_client (id)
on delete cascade
;
alter table customer_queue_archive
add constraint fk_custclntarch_has_queuearch foreign key (customer_client_id)
references customer_client_archive (id)
on delete cascade
;
alter table customer_release
add constraint fk_customer_has_releases foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_release
add constraint fk_customer_release_genre foreign key (customer_given_genre_id)
references genre (id)
;
alter table customer_release
add constraint fk_customer_rel_is_release foreign key (release_id)
references release (id)
;
alter table customer_searches
add constraint fk_customer_did_searches foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_searches
add constraint fk_customer_searches_artist foreign key (selected_artist_id)
references artist (id)
;
alter table customer_searches
add constraint fk_customer_searches_cust foreign key (selected_customer_id)
references customer (id)
;
alter table customer_searches
add constraint fk_customer_searches_playlist foreign key (selected_playlist_id)
references playlist (id)
;
alter table customer_searches
add constraint fk_customersearches_release foreign key (selected_release_id)
references release (id)
;
alter table customer_searches
add constraint fk_customer_searches_track foreign key (selected_track_id)
references track (id)
;
alter table customer_session
add constraint fk_cust_session_has_ccode foreign key (country_code)
references country_code (code)
;
alter table customer_session
add constraint fk_cust_sess_has_cust_client foreign key (customer_client_id)
references customer_client (id)
;
alter table customer_session
add constraint fk_cust_session_has_net_code foreign key (network_code_id)
references network_code (id)
;
alter table customer_session
add constraint fk_session_for_customer foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_session
add constraint fk_session_for_device foreign key (device_id)
references device (id)
on delete cascade
;
alter table customer_session
add constraint fk_session_for_operator foreign key (operator_id)
references operator (id)
;
alter table customer_session
add constraint fk_session_for_service foreign key (service_id)
references service (id)
on delete cascade
;
alter table customer_session
add constraint fk_session_in_country foreign key (country)
references country (country)
;
alter table customer_session
add constraint fk_session_in_currency foreign key (currency)
references currency (currency)
;
alter table customer_session
add constraint fk_session_in_lang foreign key (language)
references language (language)
;
alter table customer_set
add constraint fk_customer_set_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table customer_set_item
add constraint fk_cust_set_item_is_cust foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_set_item
add constraint fk_cust_set_item_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table customer_set_item
add constraint fk_customer_set_has_customers foreign key (customer_set_id)
references customer_set (id)
;
alter table customer_set_lang
add constraint fk_cust_set_has_langs foreign key (customer_set_id)
references customer_set (id)
;
alter table customer_set_lang
add constraint fk_cust_set_lang_has_lang foreign key (language)
references language (language)
;
alter table customer_set_lang
add constraint fk_cust_s_lang_has_image_set foreign key (image_set_id)
references image_set (id)
;
alter table customer_sim
add constraint fk_cust_sim_has_ccode foreign key (country_code)
references country_code (code)
;
alter table customer_sim
add constraint fk_cust_sim_has_customer foreign key (customer_id)
references customer (id)
;
alter table customer_sim
add constraint fk_cust_sim_has_net_code foreign key (network_code_id)
references network_code (id)
;
alter table customer_store
add constraint fk_custclient_has_store foreign key (customer_client_id)
references customer_client (id)
on delete cascade
;
alter table customer_store_archive
add constraint fk_custclntarch_has_storearch foreign key (customer_client_id)
references customer_client_archive (id)
on delete cascade
;
alter table customer_subscription
add constraint fk_customer_has_subscriptions foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_subscription
add constraint fk_customersub_is_subscription foreign key (subscription_id)
references service_subscription (id)
;
alter table customer_subscription
add constraint fk_customer_refers_to_errmsg foreign key (error_message_id)
references message (id)
;
alter table customer_to_customer
add constraint fk_customer_refersto_customers foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_to_customer
add constraint fk_customer_genre_genre foreign key (customer_given_genre_id)
references genre (id)
;
alter table customer_to_customer
add constraint fk_referred_cust_is_customer foreign key (other_customer_id)
references customer (id)
on delete cascade
;
alter table customer_to_customer_request
add constraint fk_c_to_c_req_has_customer foreign key (customer_id)
references customer (id)
;
alter table customer_to_customer_request
add constraint fk_c_to_c_req_has_other_cust foreign key (other_customer_id)
references customer (id)
;
alter table customer_track
add constraint fk_customer_has_tracks foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table customer_track
add constraint fk_customer_purch_track foreign key (purchased_id)
references purchased (id)
;
alter table customer_track
add constraint fk_customer_track_genre foreign key (customer_genre_id)
references genre (id)
;
alter table customer_track
add constraint fk_customer_track_is_track foreign key (track_id)
references track (id)
;
alter table customer_track_store
add constraint fk_cust_trk_store_has_custclnt foreign key (customer_client_id)
references customer_client (id)
;
alter table device
add constraint fk_device_manufact_company foreign key (manufacturer_company_id)
references company (id)
;
alter table device
add constraint fk_device_has_image_set foreign key (image_set_id)
references image_set (id)
;
alter table device
add constraint fk_device_has_message_set foreign key (message_set_id)
references message_set (id)
;
alter table device
add constraint fk_device_has_prop_set foreign key (property_set_id)
references property_set (id)
;
alter table device_count
add constraint fk_device_count_for_country foreign key (country)
references country (country)
;
alter table device_count
add constraint fk_device_count_for_distrib foreign key (distributor_id)
references distributor (id)
;
alter table device_count
add constraint fk_device_count_for_operator foreign key (operator_id)
references operator (id)
on delete cascade
;
alter table device_count
add constraint fk_device_count_for_service foreign key (service_id)
references service (id)
on delete cascade
;
alter table device_count
add constraint fk_device_has_count foreign key (device_id)
references device (id)
on delete cascade
;
alter table device_data
add constraint fk_device_data_for_service foreign key (service_id)
references service (id)
on delete cascade
;
alter table device_data
add constraint fk_device_lastbuy_customer foreign key (last_buy_customer_id)
references customer (id)
;
alter table device_data
add constraint fk_device_lastplay_customer foreign key (last_play_customer_id)
references customer (id)
;
alter table device_data
add constraint fk_device_lastsearch_customer foreign key (last_search_customer_id)
references customer (id)
;
alter table device_data
add constraint fk_device_has_data foreign key (device_id)
references device (id)
on delete cascade
;
alter table device_exception_config
add constraint fk_device_has_device_exception foreign key (device_id)
references device (id)
;
alter table device_exception_config
add constraint fk_device_has_exception foreign key (exception_config_id)
references exception_config (id)
;
alter table device_file_type
add constraint fk_devicefiletype_is_filetype foreign key (file_type_id)
references file_type (id)
on delete cascade
;
alter table device_file_type
add constraint fk_device_has_file_types foreign key (device_id)
references device (id)
on delete cascade
;
alter table device_set
add constraint fk_device_has_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table device_set_item
add constraint fk_device_set_item_is_device foreign key (device_id)
references device (id)
on delete cascade
;
alter table device_set_item
add constraint fk_device_set_item_ed_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table device_set_item
add constraint fk_device_set_has_items foreign key (device_set_id)
references device_set (id)
on delete cascade
;
alter table distributor
add constraint fk_distributes_to_country foreign key (distribution_country)
references country (country)
;
alter table distributor
add constraint fk_distributes_to_region foreign key (distribution_region_id)
references region (id)
;
alter table distributor
add constraint fk_distributor_is_company foreign key (company_id)
references company (id)
;
alter table editor_note
add constraint fk_editor_note_cre_user foreign key (created_by_user_id)
references system_user (id)
;
alter table editor_note
add constraint fk_editor_note_mod_user foreign key (modified_by_user_id)
references system_user (id)
;
alter table editor_note
add constraint fk_service_has_editor_notes foreign key (service_id)
references service (id)
on delete cascade
;
alter table editor_note_lang
add constraint fk_editor_note_for_lang foreign key (language)
references language (language)
on delete cascade
;
alter table editor_note_lang
add constraint fk_editor_note_has_langs foreign key (editor_note_id)
references editor_note (id)
on delete cascade
;
alter table editor_relate
add constraint fk_editor_relate_cre_user foreign key (created_by_user_id)
references system_user (id)
;
alter table editor_relate
add constraint fk_editor_relate_artist_set foreign key (artist_set_id)
references artist_set (id)
;
alter table editor_relate
add constraint fk_editor_relate_cust_set foreign key (customer_set_id)
references customer_set (id)
;
alter table editor_relate
add constraint fk_editor_relate_rel_set foreign key (release_set_id)
references release_set (id)
;
alter table editor_relate
add constraint fk_editor_relate_story_set foreign key (story_set_id)
references story_set (id)
;
alter table editor_relate
add constraint fk_editor_relate_track_set foreign key (track_set_id)
references track_set (id)
;
alter table editor_relate
add constraint fk_editor_relate_mod_user foreign key (modified_by_user_id)
references system_user (id)
;
alter table editor_relate
add constraint fk_editor_has_many_relates foreign key (service_id)
references service (id)
on delete cascade
;
alter table event
add constraint fk_customer_has_event foreign key (customer_id)
references customer (id)
;
alter table event
add constraint fk_customer_event_is_type foreign key (event_type_id)
references event_type (id)
;
alter table event
add constraint fk_event_service_f_service foreign key (service_id)
references service (id)
;
alter table event
add constraint fk_session_has_events foreign key (customer_session_id)
references customer_session (id)
on delete cascade
;
alter table event_obj
add constraint fk_event_has_objects foreign key (event_id)
references event (id)
on delete cascade
;
alter table event_type_set_item
add constraint fk_evt_typ_set_itm_in_set foreign key (event_type_set_id)
references event_type_set (id)
;
alter table event_type_set_item
add constraint fk_evt_t_set_itm_is_evt_t foreign key (event_type_id)
references event_type (id)
;
alter table event_val
add constraint fk_event_has_values foreign key (event_id)
references event (id)
on delete cascade
;
alter table exception_config
add constraint fk_exception_has_event_type foreign key (event_type_id)
references event_type (id)
;
alter table exception_config_event
add constraint fk_exception_caused_by_event foreign key (caused_by_event_id)
references event (id)
;
alter table exception_config_event
add constraint fk_except_event_has_except foreign key (exception_id)
references exception_config (id)
;
alter table exception_config_set_item
add constraint fk_expt_set_itm_in_expt_set foreign key (exception_config_set_id)
references exception_config_set (id)
;
alter table exception_config_set_item
add constraint fk_excpt_set_itm_is_excpt foreign key (exception_config_id)
references exception_config (id)
;
alter table external_error_map
add constraint fk_external_external__service foreign key (service_id)
references service (id)
;
alter table external_error_map
add constraint fk_external_maps_to_essage foreign key (message_id)
references message (id)
;
alter table genre_grouping
add constraint fk_genre_is_child_genre foreign key (genre_id)
references genre (id)
;
alter table genre_grouping
add constraint fk_genre_is_prim_genre foreign key (primary_genre_id)
references primary_genre (id)
;
alter table genre_set
add constraint fk_genre_set_has_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table genre_set_item
add constraint fk_genre_set_item_is_genre foreign key (genre_id)
references genre (id)
on delete cascade
;
alter table genre_set_item
add constraint fk_genre_set_item_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table genre_set_item
add constraint fk_genre_set_has_items foreign key (genre_set_id)
references genre_set (id)
on delete cascade
;
alter table help_article
add constraint fk_help_art_has_key foreign key (help_article_key_id)
references help_article_key (id)
;
alter table help_article
add constraint fk_help_art_has_body_mess foreign key (body_message_id)
references help_message (id)
;
alter table help_article
add constraint fk_help_art_has_label_mess foreign key (label_message_id)
references help_message (id)
;
alter table help_article
add constraint fk_hlp_art_has_title_mess foreign key (title_message_id)
references help_message (id)
;
alter table help_article_set_item
add constraint fk_help_art_is_ste_itm foreign key (help_article_id)
references help_article (id)
;
alter table help_article_set_item
add constraint fk_help_art_set_has_items foreign key (help_article_set_id)
references help_article_set (id)
;
alter table help_article_set_item
add constraint fk_hlp_art_set_itm_is_key foreign key (help_article_key_id)
references help_article_key (id)
;
alter table help_category
add constraint fk_hlp_cat_has_hlp_art_set foreign key (help_article_set_id)
references help_article_set (id)
;
alter table help_category
add constraint fk_help_cat_has_key foreign key (help_category_key_id)
references help_category_key (id)
;
alter table help_category
add constraint fk_elp_cathas_title_mess foreign key (title_message_id)
references help_message (id)
;
alter table help_category_set_item
add constraint fk_help_cat_is_set_item foreign key (help_category_id)
references help_category (id)
;
alter table help_category_set_item
add constraint fk_help_cat_set_has_items foreign key (help_category_set_id)
references help_category_set (id)
;
alter table help_category_set_item
add constraint fk_hlp_cat_set_itm_has_key foreign key (help_category_key_id)
references help_category_key (id)
;
alter table help_event_type_article
add constraint fk_hlp_e_t_arti_has_art_set foreign key (help_article_set_id)
references help_article_set (id)
;
alter table help_event_type_article
add constraint fk_hlp_e_t_art_has_c_vers foreign key (client_version_id)
references client_version (id)
;
alter table help_event_type_article
add constraint fk_hlp_e_t_art_has_device foreign key (device_id)
references device (id)
;
alter table help_event_type_article
add constraint fk_hlp_e_t_art_has_service foreign key (service_id)
references service (id)
;
alter table help_message_lang
add constraint fk_help_message_has_langs foreign key (help_message_id)
references help_message (id)
;
alter table help_message_lang
add constraint fk_hlp_mess_lg_has_lang foreign key (language)
references language (language)
;
alter table image_file
add constraint fk_image_file_is_filetype foreign key (file_type_id)
references file_type (id)
;
alter table image_file
add constraint fk_image_has_file foreign key (image_id)
references image (id)
on delete cascade
;
alter table image_list_item
add constraint fk_image_list_item_is_set foreign key (image_set_id)
references image_set (id)
on delete cascade
;
alter table image_list_item
add constraint fk_image_list_has_items foreign key (image_list_id)
references image_list (id)
on delete cascade
;
alter table image_set
add constraint fk_image_set_has_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table image_set_item
add constraint fk_image_set_item_is_image foreign key (image_id)
references image (id)
on delete cascade
;
alter table image_set_item
add constraint fk_image_set_item_editor_note foreign key (image_set_item_editor_note_id)
references editor_note (id)
on delete set null
;
alter table image_set_item
add constraint fk_image_set_has_item foreign key (image_set_item_image_set_id)
references image_set (id)
;
alter table language
add constraint fk_language_default_lang foreign key (default_to_language)
references language (language)
;
alter table language
add constraint fk_language_has_image_set foreign key (image_set_id)
references image_set (id)
;
alter table language_lang
add constraint fk_language_lang_has_language foreign key (language)
references language (language)
;
alter table language_lang
add constraint fk_language_lang_has_viewable foreign key (viewable_language)
references language (language)
;
alter table language_swear
add constraint fk_stopword_for_language foreign key (country)
references language (language)
on delete cascade
;
alter table mail
add constraint fk_mail_from_customer foreign key (from_customer_id)
references customer (id)
;
alter table mail_attachment
add constraint fk_mail_att_is_release foreign key (release_id)
references release (id)
;
alter table mail_attachment
add constraint fk_mail_attachment_is_artist foreign key (artist_id)
references artist (id)
;
alter table mail_attachment
add constraint fk_mail_att_is_customer foreign key (customer_id)
references customer (id)
;
alter table mail_attachment
add constraint fk_mail_att_is_playlist foreign key (playlist_id)
references playlist (id)
;
alter table mail_attachment
add constraint fk_mail_att_is_track foreign key (track_id)
references track (id)
;
alter table mail_attachment
add constraint fk_mail_has_attachments foreign key (mail_id)
references mail (id)
;
alter table message
add constraint fk_message_has_message_key foreign key (message_key_id)
references message_key (id)
;
alter table message_lang
add constraint fk_message_lang_for_lang foreign key (language)
references language (language)
on delete cascade
;
alter table message_lang
add constraint fk_message_has_langs foreign key (message_id)
references message (id)
on delete cascade
;
alter table message_set_item
add constraint fk_message_set_item_has_key foreign key (message_key_id)
references message_key (id)
;
alter table message_set_item
add constraint fk_message_item_is_message foreign key (message_id)
references message (id)
on delete cascade
;
alter table message_set_item
add constraint fk_message_has_items foreign key (message_set_id)
references message_set (id)
on delete cascade
;
alter table network_code
add constraint fk_network_code_has_ctry_code foreign key (country_code)
references country_code (code)
;
alter table network_code
add constraint fk_network_code_has_operator foreign key (operator_id)
references operator (id)
;
alter table object_log
add constraint fk_obj_log_may_have_serv foreign key (service_id)
references service (id)
;
alter table operator
add constraint fk_operator_is_company foreign key (company_id)
references company (id)
;
alter table operator
add constraint fk_operator_has_parent foreign key (parent_operator_id)
references operator (id)
;
alter table operator
add constraint fk_oper_must_prmary_country foreign key (operating_country)
references country (country)
;
alter table operator_gateway
add constraint fk_operator_has_gateways foreign key (operator_id)
references operator (id)
on delete cascade
;
alter table ota_install
add constraint fk_ota_install_has_clt_bld foreign key (client_build_id)
references client_build (id)
;
alter table ota_install
add constraint fk_ota_install_has_custr foreign key (customer_id)
references customer (id)
;
alter table playlist
add constraint fk_playlist_for_service foreign key (service_id)
references service (id)
on delete cascade
;
alter table playlist
add constraint fk_customer_owns_playlist foreign key (owning_customer_id)
references customer (id)
on delete cascade
;
alter table playlist
add constraint fk_playlist_has_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table playlist
add constraint fk_playlist_has_image_set foreign key (image_set_id)
references image_set (id)
;
alter table playlist
add constraint fk_playlist_has_primary_genre foreign key (primary_genre_id)
references genre (id)
;
alter table playlist
add constraint fk_playlist_has_primary_art foreign key (primary_image_id)
references image (id)
;
alter table playlist
add constraint fk_playlist_has_story foreign key (primary_story_id)
references story (id)
on delete set null
;
alter table playlist
add constraint fk_playlist_has_tracks foreign key (track_set_id)
references track_set (id)
;
alter table playlist
add constraint fk_playlist_has_related_set foreign key (related_playlist_set_id)
references playlist_set (id)
on delete set null
;
alter table playlist
add constraint fk_playlist_has_similar_set foreign key (similar_playlist_set_id)
references playlist_set (id)
on delete set null
;
alter table playlist
add constraint fk_playlist_synch_with foreign key (synchronized_with_playlist_id)
references playlist (id)
on delete set null
;
alter table playlist_aka
add constraint fk_playlist_has_aka foreign key (playlist_id)
references playlist (id)
on delete cascade
;
alter table playlist_aka
add constraint fk_service_has_playlist_aka foreign key (service_id)
references service (id)
on delete cascade
;
alter table playlist_count
add constraint fk_playlist_count_for_device foreign key (device_id)
references device (id)
on delete cascade
;
alter table playlist_count
add constraint fk_playlist_has_count foreign key (playlist_id)
references playlist (id)
on delete cascade
;
alter table playlist_count_live
add constraint fk_pl_live_has_count foreign key (playlist_id)
references playlist (id)
on delete cascade
;
alter table playlist_count_live_aday
add constraint fk_pllive_has_count_a foreign key (playlist_id)
references playlist (id)
on delete cascade
;
alter table playlist_data
add constraint fk_playlist_playedby_customer foreign key (last_play_customer_id)
references customer (id)
;
alter table playlist_data
add constraint fk_playlist_ratedby_customer foreign key (last_rating_customer_id)
references customer (id)
;
alter table playlist_data
add constraint fk_playlist_searchedby_cust foreign key (last_search_customer_id)
references customer (id)
;
alter table playlist_data
add constraint fk_playlist_has_data foreign key (playlist_id)
references playlist (id)
on delete cascade
;
alter table playlist_genre
add constraint fk_playlist_genre_is_genre foreign key (genre_id)
references genre (id)
;
alter table playlist_genre
add constraint fk_playlist_has_genres foreign key (playlist_id)
references playlist (id)
on delete cascade
;
alter table playlist_list_item
add constraint fk_playlist_list_item_is_ps foreign key (playlist_set_id)
references playlist_set (id)
;
alter table playlist_list_item
add constraint fk_playlist_list_has_items foreign key (playlist_list_id)
references playlist_list (id)
on delete cascade
;
alter table playlist_list_lang
add constraint fk_playlist_list_has_langs foreign key (playlist_list_id)
references playlist_list (id)
;
alter table playlist_list_lang
add constraint fk_plyl_list_lang_has_lang foreign key (language)
references language (language)
;
alter table playlist_set
add constraint fk_playlist_set_has_genre foreign key (primary_genre_id)
references primary_genre (id)
;
alter table playlist_set
add constraint fk_playlist_set_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table playlist_set_item
add constraint fk_playlist_set_has_playlists foreign key (playlist_set_id)
references playlist_set (id)
;
alter table playlist_set_item
add constraint fk_playlist_set_item_playlist foreign key (playlist_id)
references playlist (id)
on delete cascade
;
alter table playlist_set_item
add constraint fk_playlistsetitem_editornote foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table playlist_set_lang
add constraint fk_playlist_lang_has_lang foreign key (language)
references language (language)
;
alter table playlist_set_lang
add constraint fk_playlist_set_has_langs foreign key (playlist_set_id)
references playlist_set (id)
;
alter table playlist_set_lang
add constraint fk_plylst_s_lang_has_image_set foreign key (image_set_id)
references image_set (id)
;
alter table pnp_helper_job_status
add constraint fk_pnph_job_stat_has_custcli foreign key (customer_client_id)
references customer_client (id)
;
alter table pnp_helper_job_status
add constraint fk_pnph_job_stat_has_pnph_conf foreign key (pnp_helper_job_config_id)
references pnp_helper_job_config (id)
;
alter table price
add constraint fk_price_has_edit0r_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table price_local
add constraint fk_price_local_for_country foreign key (country)
references country (country)
on delete cascade
;
alter table price_local
add constraint fk_price_local_has_currency foreign key (currency)
references currency (currency)
;
alter table price_local
add constraint fk_price_has_locale foreign key (price_id)
references price (id)
on delete cascade
;
alter table price_set
add constraint fk_price_set_has_edit0r_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table price_set_item
add constraint fk_pricesetitem_is_price foreign key (price_id)
references price (id)
;
alter table price_set_item
add constraint fk_price_set_item_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table price_set_item
add constraint fk_price_se_price_set_price_se foreign key (price_set_id)
references price_set (id)
on delete cascade
;
alter table promotion
add constraint fk_promotion_has_artist_set foreign key (artist_set_id)
references artist_set (id)
;
alter table promotion
add constraint fk_promotion_has_cust_set foreign key (customer_set_id)
references customer_set (id)
;
alter table promotion
add constraint fk_promotion_has_device_set foreign key (device_set_id)
references device_set (id)
;
alter table promotion
add constraint fk_promotion_has_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table promotion
add constraint fk_promotion_has_image_set foreign key (image_set_id)
references image_set (id)
;
alter table promotion
add constraint fk_promotion_has_message_set foreign key (message_set_id)
references message_set (id)
;
alter table promotion
add constraint fk_promotion_has_prices foreign key (price_set_id)
references price_set (id)
;
alter table promotion
add constraint fk_promotion_has_release_set foreign key (release_set_id)
references release_set (id)
;
alter table promotion
add constraint fk_promotion_has_story_set foreign key (story_set_id)
references story_set (id)
;
alter table promotion
add constraint fk_promotion_has_track_set foreign key (track_set_id)
references track_set (id)
;
alter table promotion_count
add constraint fk_promotion_cnt_for_artist foreign key (artist_id)
references artist (id)
on delete cascade
;
alter table promotion_count
add constraint fk_promotion_cnt_for_cntry foreign key (country)
references country (country)
on delete cascade
;
alter table promotion_count
add constraint fk_promotion_cnt_for_cust foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table promotion_count
add constraint fk_promotion_cnt_for_device foreign key (device_id)
references device (id)
on delete cascade
;
alter table promotion_count
add constraint fk_promotion_cnt_for_distribu foreign key (distributor_id)
references distributor (id)
on delete cascade
;
alter table promotion_count
add constraint fk_promotin_cnt_for_operator foreign key (operator_id)
references operator (id)
on delete cascade
;
alter table promotion_count
add constraint fk_promotion_cnt_for_rel foreign key (release_id)
references release (id)
on delete cascade
;
alter table promotion_count
add constraint fk_promotion_cnt_for_service foreign key (service_id)
references service (id)
on delete cascade
;
alter table promotion_count
add constraint fk_promotion_cnt_for_track foreign key (track_id)
references track (id)
on delete cascade
;
alter table promotion_count
add constraint fk_promotion_has_count foreign key (promotion_id)
references promotion (id)
on delete cascade
;
alter table promotion_set
add constraint fk_promotion_set_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table promotion_set_item
add constraint fk_promotion_set_item_promo foreign key (promotion_id)
references promotion (id)
on delete cascade
;
alter table promotion_set_item
add constraint fk_promotinsetitem_editornote foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table promotion_set_item
add constraint fk_promotion_set_has_items foreign key (promotion_set_id)
references promotion_set (id)
on delete cascade
;
alter table property
add constraint fk_property_has_key foreign key (property_key_id)
references property_key (id)
;
alter table property_set_item
add constraint fk_property_set_has_items foreign key (property_set_id)
references property_set (id)
;
alter table property_set_item
add constraint fk_prop_set_item_has_key foreign key (property_key_id)
references property_key (id)
;
alter table property_set_item
add constraint fk_prop_set_item_is_prop foreign key (property_id)
references property (id)
;
alter table publish_set
add constraint fk_publish_set_has_artist_set foreign key (artist_set_id)
references artist_set (id)
;
alter table publish_set
add constraint fk_pub_set_has_cust_set foreign key (customer_set_id)
references customer_set (id)
;
alter table publish_set
add constraint fk_pub_set_has_playlist_set foreign key (playlist_set_id)
references playlist_set (id)
;
alter table publish_set
add constraint fk_pub_set_has_pub_artist_set foreign key (publish_artist_set_id)
references artist_set (id)
;
alter table publish_set
add constraint fk_pub_set_has_pub_c_set foreign key (publish_customer_set_id)
references customer_set (id)
;
alter table publish_set
add constraint fk_pub_set_has_pub_pl_set foreign key (publish_playlist_set_id)
references playlist_set (id)
;
alter table publish_set
add constraint fk_pub_set_has_pub_rel_set foreign key (publish_release_set_id)
references release_set (id)
;
alter table publish_set
add constraint fk_pub_set_has_pub_s_set foreign key (publish_story_set_id)
references story_set (id)
;
alter table publish_set
add constraint fk_pub_set_has_pub_trk_set foreign key (publish_track_set_id)
references track_set (id)
;
alter table publish_set
add constraint fk_pub_set_has_release_set foreign key (release_set_id)
references release_set (id)
;
alter table publish_set
add constraint fk_pub_set_has_story_set foreign key (story_set_id)
references story_set (id)
;
alter table publish_set
add constraint fk_pub_set_has_track_set foreign key (track_set_id)
references track_set (id)
;
alter table purchased
add constraint fk_customer_has_purchases foreign key (customer_id)
references customer (id)
on delete cascade
;
alter table purchased
add constraint fk_purchased_at_price foreign key (price_id)
references price (id)
;
alter table purchased
add constraint fk_purchased_from_distrib foreign key (distributor_id)
references distributor (id)
;
alter table purchased
add constraint fk_purchased_in_event foreign key (event_id)
references event (id)
on delete cascade
;
alter table purchased
add constraint fk_purchased_in_service foreign key (service_id)
references service (id)
on delete cascade
;
alter table purchased
add constraint fk_purchased_in_session foreign key (session_id)
references customer_session (id)
on delete cascade
;
alter table purchased
add constraint fk_purchased_release foreign key (release_id)
references release (id)
;
alter table purchased
add constraint fk_purchased_track foreign key (track_id)
references track (id)
;
alter table purchased
add constraint fk_purchased_under_promo foreign key (promotion_id)
references promotion (id)
;
alter table recommend_request_queue
add constraint fk_recom_req_q_has_customer foreign key (customer_id)
references customer (id)
;
alter table recommend_request_queue
add constraint fk_recom_req_q_has_service foreign key (service_id)
references service (id)
;
alter table region_country
add constraint fk_region_c_region_co_country foreign key (country)
references country (country)
;
alter table region_country
add constraint fk_region_has_countries foreign key (region_id)
references region (id)
on delete cascade
;
alter table release
add constraint fk_release_first_country foreign key (first_marketed_in_country)
references country (country)
;
alter table release
add constraint fk_release_has_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table release
add constraint fk_released_has_one_artist_set foreign key (artist_set_id)
references artist_set (id)
on delete set null
;
alter table release
add constraint fk_release_has_one_artset foreign key (image_set_id)
references image_set (id)
on delete set null
;
alter table release
add constraint fk_release_primary_image foreign key (primary_image_id)
references image (id)
;
alter table release
add constraint fk_release_has_record_label foreign key (record_label_company_id)
references company (id)
;
alter table release
add constraint fk_release_has_specific_price foreign key (specific_price_id)
references price (id)
;
alter table release
add constraint fk_release_may_have_playlist foreign key (playlist_id)
references playlist (id)
;
alter table release
add constraint fk_release_has_primary_story foreign key (primary_story_id)
references story (id)
on delete set null
;
alter table release
add constraint fk_release_has_sleeve_notes foreign key (sleeve_notes_story_id)
references story (id)
;
alter table release
add constraint fk_release_has_story_set foreign key (story_set_id)
references story_set (id)
on delete set null
;
alter table release
add constraint fk_release_has_primary_artist foreign key (primary_artist_id)
references artist (id)
;
alter table release
add constraint fk_release_has_primary_genre foreign key (primary_genre_id)
references primary_genre (id)
;
alter table release
add constraint fk_release_related_releases foreign key (related_release_set_id)
references release_set (id)
;
alter table release
add constraint fk_release_similar_releases foreign key (similar_release_set_id)
references release_set (id)
on delete set null
;
alter table release_aka
add constraint fk_release_has_aka foreign key (release_id)
references release (id)
on delete cascade
;
alter table release_count
add constraint fk_release_cnt_for_country foreign key (country)
references country (country)
;
alter table release_count
add constraint fk_release_count_for_device foreign key (device_id)
references device (id)
on delete cascade
;
alter table release_count
add constraint fk_release_count_for_distrib foreign key (distributor_id)
references distributor (id)
;
alter table release_count
add constraint fk_release_count_for_operator foreign key (operator_id)
references operator (id)
on delete cascade
;
alter table release_count
add constraint fk_release_count_for_service foreign key (service_id)
references service (id)
on delete cascade
;
alter table release_count
add constraint fk_release_has_count foreign key (release_id)
references release (id)
on delete cascade
;
alter table release_count_live
add constraint fk_rc_live_has_count foreign key (release_id)
references release (id)
on delete cascade
;
alter table release_count_live
add constraint fk_rc_live_has_service foreign key (service_id)
references service (id)
on delete cascade
;
alter table release_count_live_aday
add constraint fk_rclive_has_count_a foreign key (release_id)
references release (id)
on delete cascade
;
alter table release_count_live_aday
add constraint fk_rclive_has_service_a foreign key (service_id)
references service (id)
on delete cascade
;
alter table release_data
add constraint fk_release_data_for_service foreign key (service_id)
references service (id)
on delete cascade
;
alter table release_data
add constraint fk_release_bought_by_cust foreign key (last_buy_customer_id)
references customer (id)
;
alter table release_data
add constraint fk_release_played_by_cust foreign key (last_play_customer_id)
references customer (id)
;
alter table release_data
add constraint fk_release_rated_by_cust foreign key (last_rating_customer_id)
references customer (id)
;
alter table release_data
add constraint fk_release_searched_by_cust foreign key (last_search_customer_id)
references customer (id)
;
alter table release_data
add constraint fk_release_has_data foreign key (release_id)
references release (id)
on delete cascade
;
alter table release_genre
add constraint fk_release_genre_is_genre foreign key (genre_id)
references genre (id)
;
alter table release_genre
add constraint fk_release_has_genres foreign key (release_id)
references release (id)
on delete cascade
;
alter table release_list_item
add constraint fk_release_list_item_is_rs foreign key (release_set_id)
references release_set (id)
;
alter table release_list_item
add constraint fk_release_list_has_items foreign key (release_list_id)
references release_list (id)
on delete cascade
;
alter table release_list_lang
add constraint fk_release_list_has_langs foreign key (release_list_id)
references release_list (id)
;
alter table release_list_lang
add constraint fk_rel_list_lang_has_lang foreign key (language)
references language (language)
;
alter table release_set
add constraint fk_release_set_has_genre foreign key (primary_genre_id)
references primary_genre (id)
;
alter table release_set
add constraint fk_release_set_has_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table release_set_item
add constraint fk_release_set_item_is_release foreign key (release_id)
references release (id)
on delete cascade
;
alter table release_set_item
add constraint fk_release_set_item_editornote foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table release_set_item
add constraint fk_release_has_item foreign key (release_set_id)
references release_set (id)
;
alter table release_set_lang
add constraint fk_rel_set_has_langs foreign key (release_set_id)
references release_set (id)
;
alter table release_set_lang
add constraint fk_rel_set_lang_has_lang foreign key (language)
references language (language)
;
alter table release_set_lang
add constraint fk_rel_s_lang_has_image_set foreign key (image_set_id)
references image_set (id)
;
alter table release_track
add constraint fk_release_has_tracks foreign key (release_id)
references release (id)
on delete cascade
;
alter table release_track
add constraint fk_release_track_is_track foreign key (track_id)
references track (id)
;
alter table scheduled_activity_log
add constraint fk_sched_act_was_logged foreign key (scheduled_activity_id)
references scheduled_activity (id)
;
alter table server_version
add constraint fk_serv_vers_has_c_vers_set foreign key (client_version_set_id)
references client_version_set (id)
;
alter table server_version
add constraint fk_version_has_release_notes foreign key (release_notes_story_id)
references story (id)
;
alter table server_version
add constraint fk_version_has_device_set foreign key (device_set_id)
references device_set (id)
;
alter table server_version
add constraint fk_version_has_image_set foreign key (image_set_id)
references image_set (id)
;
alter table server_version
add constraint fk_version_has_message_set foreign key (message_set_id)
references message_set (id)
;
alter table service
add constraint fk_serv_has_libr_story_set foreign key (library_story_set_id)
references story_set (id)
;
alter table service
add constraint fk_service_has_seed_cust foreign key (seed_customer_id)
references customer (id)
;
alter table service
add constraint fk_service_has_story_set foreign key (story_set_id)
references story_set (id)
;
alter table service
add constraint fk_service_service_i_server_v foreign key (version_id)
references server_version (id)
;
alter table service
add constraint fk_service_has_chart_set foreign key (chart_set_id)
references chart_set (id)
;
alter table service
add constraint fk_service_has_def_cont_sub foreign key (default_contract_sub_id)
references service_subscription (id)
;
alter table service
add constraint fk_service_has_def_payg_sub foreign key (default_payg_sub_id)
references service_subscription (id)
;
alter table service
add constraint fk_service_has_device_set foreign key (device_set_id)
references device_set (id)
;
alter table service
add constraint fk_service_has_genre_set foreign key (genre_set_id)
references genre_set (id)
;
alter table service
add constraint fk_service_has_message_set foreign key (message_set_id)
references message_set (id)
;
alter table service
add constraint fk_service_has_promo_set foreign key (promotion_set_id)
references promotion_set (id)
;
alter table service
add constraint fk_service_has_artist_list foreign key (artist_list_id)
references artist_list (id)
;
alter table service
add constraint fk_service_has_customer_list foreign key (customer_list_id)
references customer_list (id)
;
alter table service
add constraint fk_service_has_image_list foreign key (image_list_id)
references image_list (id)
;
alter table service
add constraint fk_service_for_operator foreign key (operator_id)
references operator (id)
;
alter table service
add constraint fk_service_has_owner_company foreign key (owner_company_id)
references company (id)
;
alter table service
add constraint fk_service_has_playlist_list foreign key (playlist_list_id)
references playlist_list (id)
;
alter table service
add constraint fk_service_has_price_set foreign key (price_set_id)
references price_set (id)
;
alter table service
add constraint fk_service_primary_country foreign key (country)
references country (country)
;
alter table service
add constraint fk_service_primary_distrib foreign key (primary_distributor_id)
references distributor (id)
;
alter table service
add constraint fk_service_primary_language foreign key (default_language)
references language (language)
;
alter table service
add constraint fk_service_for_property_set foreign key (property_set_id)
references property_set (id)
;
alter table service
add constraint fk_service_has_release_list foreign key (release_list_id)
references release_list (id)
;
alter table service
add constraint fk_service_has_story_list foreign key (story_list_id)
references story_list (id)
;
alter table service
add constraint fk_service_has_terms_story foreign key (terms_conditions_story_id)
references story (id)
;
alter table service
add constraint fk_service_has_track_list foreign key (track_list_id)
references track_list (id)
;
alter table service_artist
add constraint fk_artist_is_on_service foreign key (artist_id)
references artist (id)
;
alter table service_artist
add constraint fk_cust_set_has_most_played foreign key (most_played_customer_set_id)
references customer_set (id)
;
alter table service_artist
add constraint fk_service_contains_artist foreign key (service_id)
references service (id)
;
alter table service_artist
add constraint fk_serv_artist_has_rec_art_set foreign key (recommend_artist_set_id)
references artist_set (id)
;
alter table service_billing_event
add constraint fk_is_service_billing_event foreign key (service_billing_event_id)
references billing_event (id)
;
alter table service_billing_event
add constraint fk_srv_bill_evnt_has_company foreign key (company_id)
references company (id)
;
alter table service_billing_event
add constraint fk_srv_bill_evnt_has_service foreign key (service_id)
references service (id)
;
alter table service_billing_event
add constraint fk_ref_cust_billing_event foreign key (customer_billing_event_id)
references customer_billing_event (id)
;
alter table service_count
add constraint fk_service_count_for_device foreign key (device_id)
references device (id)
on delete cascade
;
alter table service_count
add constraint fk_service_has_count foreign key (service_id)
references service (id)
on delete cascade
;
alter table service_data
add constraint fk_service_lastplay_cust foreign key (last_play_customer_id)
references customer (id)
;
alter table service_data
add constraint fk_service_lastbuy_cust foreign key (last_buy_customer_id)
references customer (id)
;
alter table service_data
add constraint fk_service_lastsearch_cust foreign key (last_search_customer_id)
references customer (id)
;
alter table service_data
add constraint fk_service_local_has_data foreign key (service_id)
references service (id)
on delete cascade
;
alter table service_distributor
add constraint fk_service_distrib_is_distrib foreign key (distributor_id)
references distributor (id)
;
alter table service_distributor
add constraint fk_service_has_distributors foreign key (service_id)
references service (id)
on delete cascade
;
alter table service_language
add constraint fk_service_language_is_lang foreign key (language)
references language (language)
;
alter table service_language
add constraint fk_service_has_languages foreign key (service_id)
references service (id)
on delete cascade
;
alter table service_license
add constraint fk_service_has_license foreign key (service_id)
references service (id)
on delete cascade
;
alter table service_queue
add constraint fk_service_has_queue foreign key (service_id)
references service (id)
on delete cascade
;
alter table service_queue_archive
add constraint fk_service_has_queuearch foreign key (service_id)
references service (id)
on delete cascade
;
alter table service_release
add constraint fk_release_appears_in_serv foreign key (release_id)
references release (id)
;
alter table service_release
add constraint fk_service_has_release foreign key (service_id)
references service (id)
;
alter table service_release
add constraint fk_servrel_has_recom_rel_set foreign key (recommend_release_set_id)
references release_set (id)
;
alter table service_subscription
add constraint fk_service_has_subscription foreign key (service_id)
references service (id)
on delete cascade
;
alter table service_track
add constraint fk_service_has_track foreign key (service_id)
references service (id)
;
alter table service_track
add constraint fk_track_exists_on_service foreign key (track_id)
references track (id)
;
alter table sms_campaign
add constraint fk_sms_camp_has_event_type foreign key (event_type_id)
references event_type (id)
;
alter table sms_campaign
add constraint fk_sms_camp_has_sched_activity foreign key (scheduled_activity_id)
references scheduled_activity (id)
;
alter table sms_campaign
add constraint fk_sms_camp_has_service foreign key (service_id)
references service (id)
;
alter table sms_event
add constraint fk_smsevent_has_event_typeid foreign key (event_type_id)
references event_type (id)
;
alter table sms_status
add constraint fk_sms_status_customer foreign key (customer_id)
references customer (id)
;
alter table sms_status
add constraint fk_sms_status_service foreign key (service_id)
references service (id)
;
alter table story
add constraint fk_story_created_by_user foreign key (created_by_user_id)
references system_user (id)
;
alter table story
add constraint fk_story_has_device_set foreign key (related_device_set_id)
references device_set (id)
;
alter table story
add constraint fk_story_has_primary_genre foreign key (primary_genre_id)
references primary_genre (id)
;
alter table story
add constraint fk_story_has_edit0r_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table story
add constraint fk_story_has_image_set foreign key (image_set_id)
references image_set (id)
;
alter table story
add constraint fk_story_has_image foreign key (primary_image_id)
references image (id)
;
alter table story
add constraint fk_story_has_artist_set foreign key (related_artist_set_id)
references artist_set (id)
;
alter table story
add constraint fk_story_has_customer_set foreign key (related_customer_set_id)
references customer_set (id)
;
alter table story
add constraint fk_story_has_playlist_set foreign key (related_playlist_set_id)
references playlist_set (id)
;
alter table story
add constraint fk_story_has_release_set foreign key (related_release_set_id)
references release_set (id)
;
alter table story
add constraint fk_story_related_story_set foreign key (related_story_set_id)
references story_set (id)
;
alter table story
add constraint fk_story_has_track_set foreign key (related_track_set_id)
references track_set (id)
;
alter table story
add constraint fk_story_similar_story_set foreign key (similar_story_set_id)
references story_set (id)
;
alter table story
add constraint fk_story_modified_by_user foreign key (modified_by_user_id)
references system_user (id)
;
alter table story_lang
add constraint fk_story_for_language foreign key (language)
references language (language)
on delete cascade
;
alter table story_lang
add constraint fk_story_lang_has_image foreign key (local_image_id)
references image (id)
;
alter table story_lang
add constraint fk_story_has_languages foreign key (story_id)
references story (id)
on delete cascade
;
alter table story_list_item
add constraint fk_story_list_item_is_ss foreign key (story_set_id)
references story_set (id)
;
alter table story_list_item
add constraint fk_story_list_has_items foreign key (story_list_id)
references story_list (id)
on delete cascade
;
alter table story_list_lang
add constraint fk_story_list_has_langs foreign key (story_list_id)
references story_list (id)
;
alter table story_list_lang
add constraint fk_stry_list_lg_has_lg foreign key (language)
references language (language)
;
alter table story_set
add constraint fk_story_set_has_image_set foreign key (image_set_id)
references image_set (id)
;
alter table story_set
add constraint fk_story_set_has_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table story_set_item
add constraint fk_story_set_item_is_story foreign key (story_id)
references story (id)
on delete cascade
;
alter table story_set_item
add constraint fk_story_set_item_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table story_set_item
add constraint fk_story_set_has_stories foreign key (story_set_id)
references story_set (id)
;
alter table story_set_lang
add constraint fk_story_set_has_langs foreign key (story_set_id)
references story_set (id)
;
alter table story_set_lang
add constraint fk_stry_set_lg_has_lg foreign key (language)
references language (language)
;
alter table system_user_service
add constraint fk_sys_user_serv_has_role foreign key (role_id)
references user_role (id)
;
alter table system_user_service
add constraint fk_user_for_services foreign key (system_user_id)
references system_user (id)
on delete cascade
;
alter table system_user_service
add constraint fk_user_for_service foreign key (service_id)
references service (id)
on delete cascade
;
alter table system_user_test_options
add constraint fk_sys_user_has_test_options foreign key (system_user_id)
references system_user (id)
;
alter table track
add constraint fk_track_has_primary_artist foreign key (primary_artist_id)
references artist (id)
;
alter table track
add constraint fk_track_member_of_release foreign key (release_id)
references release (id)
on delete set null
;
alter table track
add constraint fk_track_has_one_artist_set foreign key (artist_set_id)
references artist_set (id)
;
alter table track
add constraint fk_track_has_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table track
add constraint fk_track_has_art_set foreign key (image_set_id)
references image_set (id)
;
alter table track
add constraint fk_track_has_lyrics_story foreign key (lyrics_story_id)
references story (id)
;
alter table track
add constraint fk_track_has_primary_genre foreign key (primary_genre_id)
references primary_genre (id)
;
alter table track
add constraint fk_track_has_primary_image foreign key (primary_image_id)
references image (id)
;
alter table track
add constraint fk_track_has_primary_story foreign key (primary_story_id)
references story (id)
on delete set null
;
alter table track
add constraint fk_track_has_record_label foreign key (record_label_company_id)
references company (id)
;
alter table track
add constraint fk_track_related_trackset foreign key (related_track_set_id)
references track_set (id)
on delete set null
;
alter table track
add constraint fk_track_similar_trackset foreign key (similar_track_set_id)
references track_set (id)
on delete set null
;
alter table track
add constraint fk_track_has_specific_price foreign key (specific_price_id)
references price (id)
;
alter table track
add constraint fk_track_has_story_set foreign key (story_set_id)
references story_set (id)
on delete set null
;
alter table track
add constraint fk_track_sideloaded_by_cust foreign key (sideloaded_by_customer_id)
references customer (id)
on delete cascade
;
alter table track_aka
add constraint fk_track_has_aka foreign key (track_id)
references track (id)
on delete cascade
;
alter table track_count
add constraint fk_track_count_for_country foreign key (country)
references country (country)
;
alter table track_count
add constraint fk_track_count_for_device foreign key (device_id)
references device (id)
on delete cascade
;
alter table track_count
add constraint fk_track_count_for_distrib foreign key (distributor_id)
references distributor (id)
;
alter table track_count
add constraint fk_track_count_for_operator foreign key (operator_id)
references operator (id)
on delete cascade
;
alter table track_count
add constraint fk_track_count_for_service foreign key (service_id)
references service (id)
on delete cascade
;
alter table track_count
add constraint fk_track_has_count foreign key (track_id)
references track (id)
on delete cascade
;
alter table track_count_live
add constraint fk_tracklive_has_count foreign key (track_id)
references track (id)
on delete cascade
;
alter table track_count_live
add constraint fk_tracklive_has_service foreign key (service_id)
references service (id)
on delete cascade
;
alter table track_count_live_aday
add constraint fk_tracklive_has_count_a foreign key (track_id)
references track (id)
on delete cascade
;
alter table track_count_live_aday
add constraint fk_tracklive_has_service_a foreign key (service_id)
references service (id)
on delete cascade
;
alter table track_data
add constraint fk_track_data_for_service foreign key (service_id)
references service (id)
on delete cascade
;
alter table track_data
add constraint fk_track_bought_by_customer foreign key (last_buy_customer_id)
references customer (id)
;
alter table track_data
add constraint fk_track_playedby_customer foreign key (last_play_customer_id)
references customer (id)
;
alter table track_data
add constraint fk_track_ratedby_customer foreign key (last_rate_customer_id)
references customer (id)
;
alter table track_data
add constraint fk_track_last_search_cust foreign key (last_search_customer_id)
references customer (id)
;
alter table track_data
add constraint fk_track_has_data foreign key (track_id)
references track (id)
on delete cascade
;
alter table track_file
add constraint fk_track_file_from_distrib foreign key (distributor_id)
references distributor (id)
on delete cascade
;
alter table track_file
add constraint fk_track_file_is_filetype foreign key (file_type_id)
references file_type (id)
;
alter table track_file
add constraint fk_track_has_many_files foreign key (track_id)
references track (id)
on delete cascade
;
alter table track_genre
add constraint fk_track_genre_is_genre foreign key (genre_id)
references genre (id)
;
alter table track_genre
add constraint fk_track_has_genres foreign key (track_id)
references track (id)
on delete cascade
;
alter table track_list_item
add constraint fk_track_list_has_items foreign key (track_list_id)
references track_list (id)
on delete cascade
;
alter table track_list_item
add constraint fk_track_list_item_is_ts foreign key (track_set_id)
references track_set (id)
;
alter table track_list_lang
add constraint fk_track_list_has_langs foreign key (track_list_id)
references track_list (id)
;
alter table track_list_lang
add constraint fk_trk_lst_lg_has_lang foreign key (language)
references language (language)
;
alter table track_rights
add constraint fk_track_has_many_rights foreign key (track_id)
references track (id)
on delete cascade
;
alter table track_rights
add constraint fk_track_rights_for_country foreign key (country)
references country (country)
;
alter table track_rights
add constraint fk_track_rights_for_distrib foreign key (distributor_id)
references distributor (id)
;
alter table track_set
add constraint fk_track_set_has_genre foreign key (primary_genre_id)
references primary_genre (id)
;
alter table track_set
add constraint fk_track_set_has_editor_note foreign key (editor_note_id)
references editor_note (id)
;
alter table track_set_item
add constraint fk_track_set_item_is_track foreign key (track_id)
references track (id)
on delete cascade
;
alter table track_set_item
add constraint fk_track_set_item_editor_note foreign key (editor_note_id)
references editor_note (id)
on delete set null
;
alter table track_set_item
add constraint fk_track_set_has_items foreign key (track_set_id)
references track_set (id)
on delete cascade
;
alter table track_set_lang
add constraint fk_track_set_has_langs foreign key (track_set_id)
references track_set (id)
;
alter table track_set_lang
add constraint fk_trk_set_lg_has_lang foreign key (language)
references language (language)
;
alter table track_set_lang
add constraint fk_trk_s_lang_has_image_set foreign key (image_set_id)
references image_set (id)
;
alter table user_role_privilege
add constraint fk_priv_used_by_user_role foreign key (privilege_id)
references privilege (id)
;
alter table user_role_privilege
add constraint fk_user_role_has_privs foreign key (user_role_id)
references user_role (id)
on delete cascade
;
alter table wmdrm_metering
add constraint fk_wmdrm_met_has_client foreign key (client_id)
references client (id)
;
alter table wmdrm_metering
add constraint fk_wmdrm_met_has_custclient foreign key (customer_client_id)
references customer_client (id)
;
alter table wmdrm_metering_tracks
add constraint fk_wmdrm_mett_has_track foreign key (track_id)
references track (id)
;
alter table wmdrm_metering_tracks
add constraint fk_wmdrm_mett_has_wmdrm foreign key (wmdrm_metering_id)
references wmdrm_metering (id)
;
end;
;