|
2 | 2 | The order of tags is not preserved""" |
3 | 3 |
|
4 | 4 | from ..database import create_record, get_rows_affected |
5 | | - |
6 | | -COUNTRIES_TAG = "countries_tags" |
7 | | -tag_tables_v1 = { |
8 | | - "_keywords": "product_keywords_tag", |
9 | | - "additives_tags": "product_additives_tag", |
10 | | - "allergens_tags": "product_allergens_tag", |
11 | | - "amino_acids_tags": "product_amino_acids_tag", |
12 | | - "brands_tags": "product_brands_tag", |
13 | | - "categories_properties_tags": "product_categories_properites_tag", |
14 | | - "categories_tags": "product_categories_tag", |
15 | | - "checkers_tags": "product_checkers_tag", |
16 | | - "cities_tags": "product_cities_tag", |
17 | | - "codes_tags": "product_codes_tag", |
18 | | - "correctors_tags": "product_correctors_tag", |
19 | | - COUNTRIES_TAG: "product_countries_tag", |
20 | | - "data_quality_bugs_tags": "product_data_quality_bugs_tag", |
21 | | - "data_quality_errors_tags": "product_data_quality_errors_tag", |
22 | | - "data_quality_tags": "product_data_quality_tag", |
23 | | - "data_quality_warnings_tags": "product_data_quality_warnings_tag", |
24 | | - "data_sources_tags": "product_data_sources_tag", |
25 | | - "debug_tags": "product_debug_tag", |
26 | | - "ecoscore_tags": "product_ecoscore_tag", |
27 | | - "editors_tags": "product_editors_tag", |
28 | | - "emb_codes_tags": "product_emb_codes_tag", |
29 | | - "entry_dates_tags": "product_entry_dates_tag", |
30 | | - "food_groups_tags": "product_food_groups_tag", |
31 | | - "informers_tags": "product_informers_tag", |
32 | | - "ingredients_analysis_tags": "product_ingredients_analysis_tag", |
33 | | - "ingredients_from_palm_oil_tags": "product_ingredients_from_palm_oil_tag", |
34 | | - "ingredients_n_tags": "product_ingredients_ntag", |
35 | | - "ingredients_original_tags": "product_ingredients_original_tag", |
36 | | - "ingredients_tags": "product_ingredients_tag", |
37 | | - "ingredients_that_may_be_from_palm_oil_tags": "product_ingredients_that_may_be_from_palm_oil_tag", |
38 | | - "labels_tags": "product_labels_tag", |
39 | | - "languages_tags": "product_languages_tag", |
40 | | - "last_check_dates_tags": "product_last_check_dates_tag", |
41 | | - "last_edit_dates_tags": "product_last_edit_dates_tag", |
42 | | - "last_image_dates_tags": "product_latest_image_dates_tag", |
43 | | - "manufacturing_places_tags": "product_manufacturing_places_tag", |
44 | | - "minerals_tags": "product_minerals_tag", |
45 | | - "misc_tags": "product_misc_tag", |
46 | | - "nova_groups_tags": "product_nova_groups_tag", |
47 | | - "nucleotides_tags": "product_nucleotides_tag", |
48 | | - "nutrient_levels_tags": "product_nutrient_levels_tag", |
49 | | - "nutriscore_2021_tags": "product_nutriscore2021tag", |
50 | | - "nutriscore_2023_tags": "product_nutriscore2023tag", |
51 | | - "nutriscore_tags": "product_nutriscore_tag", |
52 | | - "nutrition_grades_tags": "product_nutrition_grades_tag", |
53 | | - "origins_tags": "product_origins_tag", |
54 | | - "other_nutritional_substances_tags": "product_other_nutritional_substances_tag", |
55 | | - "packaging_materials_tags": "product_packaging_materials_tag", |
56 | | - "packaging_recycling_tags": "product_packaging_recycling_tag", |
57 | | - "packaging_shapes_tags": "product_packaging_shapes_tag", |
58 | | - "packaging_tags": "product_packaging_tag", |
59 | | - "periods_after_opening_tags": "product_periods_after_opening_tag", |
60 | | - "photographers_tags": "product_photographers_tag", |
61 | | - "pnns_groups_1_tags": "product_pnns_groups1tag", |
62 | | - "pnns_groups_2_tags": "product_pnns_groups2tag", |
63 | | - "popularity_tags": "product_popularity_tag", |
64 | | - "purchase_places_tags": "product_purchase_places_tag", |
65 | | - "states_tags": "product_states_tag", |
66 | | - "stores_tags": "product_stores_tag", |
67 | | - "teams_tags": "product_teams_tag", |
68 | | - "traces_tags": "product_traces_tag", |
69 | | - "unknown_nutrients_tags": "product_unknown_nutrients_tag", |
70 | | - "vitamins_tags": "product_vitamins_tag", |
71 | | - "weighers_tags": "product_weighers_tag", |
72 | | -} |
73 | | - |
74 | | -# Append additional tag tables to this list when we introduce them and then add a migration to create the new tables |
75 | | -TAG_TABLES = tag_tables_v1 |
| 5 | +from .product_tags_list import COUNTRIES_TAG, TAG_TABLES |
76 | 6 |
|
77 | 7 |
|
78 | 8 | async def create_tables(transaction, tag_tables): |
|
0 commit comments