Aller au contenu

Généralisation des modèles

Liste des modèles modifiés afin de généraliser la billetterie.

Matchs

  1. table matchs => events
  2. création du modèle Event
  3. modèle Match hérite désormais de Event
  4. Champ info_match => informations

Participants

  1. création ds tables participants et participations
  2. Event has_many participants through participations
  3. finalité: remplacer nom/logo redient/visiteur

Tables de jointures et références:

rename_table :billets_matchs, :billets_events
rename_column :billets_events, :match_id, :event_id
1. billets_matchsbillets_events ; match_idevent_id

rename_table :articles_matchs, :articles_events
rename_column :articles_events, :match_id, :event_id
2. articles_matchsarticles_events ; match_idevent_id

rename_column :billet_scans, :match_id, :event_id
3. billet_scans : match_idevent_id

rename_table :formules_matchs, :events_formules
rename_column :events_formules, :match_id, :event_id
4. formules_matchsevents_formules ; match_idevent_id

rename_column :catalogues, :match_id, :event_id
5. catalogues : match_idevent_id

rename_table :matchs_modele_articles, :events_modele_articles
rename_column :events_modele_articles, :match_id, :event_id
6. matchs_modele_articlesevents_modele_articles ; match_idevent_id

rename_column :guichets, :match_id, :event_id
7. guichets : match_idevent_id

rename_table :match_disponibilites, :event_disponibilites
rename_column :event_disponibilites, :match_id, :event_id
8. match_disponibilitesevent_disponibilites ; match_idevent_id

rename_column :configuration_ventes, :match_id, :event_id
9. configuration_ventes : match_idevent_id

rename_column :events_modele_articles, :match_id, :event_id
10. events_modele_articles : match_idevent_id

rename_table :acces_matchs, :acces_events
rename_column :acces_events, :match_id, :event_id
11. acces_matchsacces_events ; match_idevent_id

rename_column :external_device_logs, :match_id, :event_id
12. external_device_logs : match_idevent_id

rename_table :categorie_publics_match_disponibilites, :categorie_publics_event_disponibilites
rename_column :categorie_publics_event_disponibilites, :match_disponibilite_id, :event_disponibilite_id
13. categorie_publics_match_disponibilitescategorie_publics_event_disponibilites ; match_disponibilite_idevent_disponibilite_id

rename_table :template_articles_match, :template_article_events
14. template_articles_matchtemplate_article_events

rename_table :produits_template_articles_match, :produits_template_article_events
rename_column :produits_template_article_events, :template_article_match_id, :template_article_event_id
15. produits_template_articles_matchproduits_template_article_events ; template_article_match_idtemplate_article_event_id

rename_index :produits_template_article_events, "index_produit_id_template_article_match_id", "index_produit_id_template_article_event_id"
rename_index :produits_template_article_events, "index_template_article_match_id_produit_id", "index_template_article_event_id_produit_id"
16. Index sur produits_template_article_events: - index_produit_id_template_article_match_idindex_produit_id_template_article_event_id - index_template_article_match_id_produit_idindex_template_article_event_id_produit_id

rename_table :categorie_publics_template_articles_match, :categorie_publics_template_article_events
rename_column :categorie_publics_template_article_events, :template_article_match_id, :template_article_event_id
17. categorie_publics_template_articles_matchcategorie_publics_template_article_events ; template_article_match_idtemplate_article_event_id

rename_index :categorie_publics_template_article_events, "index_categorie_public_id_template_article_match_id", "index_categorie_public_id_template_article_event_id"
rename_index :categorie_publics_template_article_events, "index_template_article_match_id_categorie_public_id", "index_template_article_event_id_categorie_public_id"
18. Index sur categorie_publics_template_article_events: - index_categorie_public_id_template_article_match_idindex_categorie_public_id_template_article_event_id - index_template_article_match_id_categorie_public_idindex_template_article_event_id_categorie_public_id

rename_column :ligne_catalogues, :template_article_match_id, :template_article_event_id
19. ligne_catalogues : template_article_match_idtemplate_article_event_id

rename_column :ligne_tarifs, :template_article_match_id, :template_article_event_id
20. ligne_tarifs : template_article_match_idtemplate_article_event_id

rename_column :modele_articles, :template_article_match_id, :template_article_event_id
21. modele_articles : template_article_match_idtemplate_article_event_id

rename_table :modele_catalogues_template_articles_match, :modele_catalogues_template_article_events
rename_column :modele_catalogues_template_article_events, :template_article_match_id, :template_article_event_id
22. modele_catalogues_template_articles_matchmodele_catalogues_template_article_events ; template_article_match_idtemplate_article_event_id

rename_index :modele_catalogues_template_article_events, "index_modele_catalogues_template_articles_matches", "index_modele_catalogues_template_article_events"
rename_index :modele_catalogues_template_article_events, "index_template_articles_matches_modele_catalogues", "index_template_article_events_modele_catalogues"
23. Index sur modele_catalogues_template_article_events: - index_modele_catalogues_template_articles_matchesindex_modele_catalogues_template_article_events - index_template_articles_matches_modele_cataloguesindex_template_article_events_modele_catalogues

rename_table :point_controls_template_articles_match, :point_controls_template_article_events
rename_column :point_controls_template_article_events, :template_article_match_id, :template_article_event_id
24. point_controls_template_articles_matchpoint_controls_template_article_events ; template_article_match_idtemplate_article_event_id

rename_index :point_controls_template_article_events, "index_point_control_id_template_article_match_id", "index_point_control_id_template_article_event_id"
rename_index :point_controls_template_article_events, "index_template_article_match_id_point_control_id", "index_template_article_event_id_point_control_id"
25. Index sur point_controls_template_article_events: - index_point_control_id_template_article_match_idindex_point_control_id_template_article_event_id - index_template_article_match_id_point_control_idindex_template_article_event_id_point_control_id

rename_table :reservoirs_template_articles_match, :reservoirs_template_article_events
rename_column :reservoirs_template_article_events, :template_article_match_id, :template_article_event_id
26. reservoirs_template_articles_matchreservoirs_template_article_events ; template_article_match_idtemplate_article_event_id

rename_index :reservoirs_template_article_events, "index_reservoir_id_template_article_match_id", "index_reservoir_id_template_article_event_id"
rename_index :reservoirs_template_article_events, "index_template_article_match_id_reservoir_id", "index_template_article_event_id_reservoir_id"
27. Index sur reservoirs_template_article_events: - index_reservoir_id_template_article_match_idindex_reservoir_id_template_article_event_id - index_template_article_match_id_reservoir_idindex_template_article_event_id_reservoir_id

rename_column :template_pack_coupons, :template_article_match_id, :template_article_event_id
28. template_pack_coupons : template_article_match_idtemplate_article_event_id

rename_column :configuration_stades, :match_id, :event_id
29. configuration_stades : match_idevent_id

rename_index :articles_events, "index_article_id_match_id", "index_article_id_event_id"
rename_index :articles_events, "index_match_id_article_id", "index_event_id_article_id"
30. Index sur articles_events: - index_article_id_match_idindex_article_id_event_id - index_match_id_article_idindex_event_id_article_id

rename_table :matchs_template_pack_coupons, :events_template_pack_coupons
rename_column :events_template_pack_coupons, :match_id, :event_id
31. matchs_template_pack_couponsevents_template_pack_coupons ; match_idevent_id

rename_index :events_template_pack_coupons, "index_match_template_pack_coupons", "index_event_template_pack_coupons"
rename_index :events_template_pack_coupons, "index_template_pack_coupon_match", "index_template_pack_coupon_event"
32. Index sur events_template_pack_coupons: - index_match_template_pack_couponsindex_event_template_pack_coupons - index_template_pack_coupon_matchindex_template_pack_coupon_event

rename_column :impression_stocks, :match_id, :event_id
  1. impression_stocks : match_idevent_id
rename_table :matchs_versements, :events_versements
rename_column :events_versements, :match_id, :event_id
rename_index :events_versements, :index_match_versements, :index_event_versements
rename_index :events_versements, :index_versement_match, :index_versement_event
  1. matchs_versementsevents_versements ; match_idevent_id
  2. Index sur events_versements:
    • index_match_versementsindex_event_versements
    • index_versement_matchindex_versement_event

rename_column :ligne_versements, :match_id, :event_id
36. ligne_versements : match_idevent_id

rename_column :versements, :filter_matchs, :filter_events
37. versements : filter_matchsfilter_events