PnX-SI / GeoNature

Application de saisie et de synthèse des observations faune et flore
GNU General Public License v3.0
97 stars 99 forks source link

Passage à 2.14.1 - Problème de migrations #3063

Closed MoulinZ closed 1 month ago

MoulinZ commented 1 month ago

Au passage de 2.13. à 2.14.1 d'une de mes instances, j'ai eu un problème au niveau des migrations qui se sont stoppé sur Running upgrade f4bf21ac6238 -> f9d3b95946cd, set code_profil in integer Ce problème est probablement lié à mon install qui a des triggers qui font l'ajout et l'update de données du schéma utilisateurs vers une autre instance. J'ai donc voulu relancer les migrations et j'ai fait un geonature db autoupgrade mais ça n'a rien donné, n'est-ce pas ce qu'il fallait faire ? Peut être faut il faire un stamp head avant mais vers quelle migration ? je ne comprend pas bien la mécanique. GeoNature semble marcher, mais je pense qu'il doit quand même y avoir des problèmes en bdd.

camillemonchicourt commented 1 month ago

Que donne la commande "geonature db status" ?

MoulinZ commented 1 month ago

Tout est coché. Ok bah finalement ça a peut être freeze après avoir effectué la dernière migration.

camillemonchicourt commented 1 month ago

Tu peux partager le résultat de la commande ?

camillemonchicourt commented 1 month ago

Tu peux, aussi regarder si ce que fait cette migration que tu indiques a été réalisé dans ta BDD : https://github.com/PnX-SI/UsersHub-authentification-module/blob/41fcc43aeef8abef7b2b09a890c166c9bbe2a50f/src/pypnusershub/migrations/versions/f9d3b95946cd_set_code_profil_in_integer.py

MoulinZ commented 1 month ago
[exports ✓]
  [x] ┰ c2d02e345a06 create export schema
  [x] ┃ 4cac712a2ce6 Create export notifications
  [x] ┃ fdc2d823a8b9 Add primary key view column in t_exports
  [x] ┃ 75edd92560d7 add token in gn_exports.cor_exports_roles
  [x] ┃ fe1347f4805f Fix and improve SINP DEE synthese view (see #105)
  [x] ┃ 7876d042e673 Delete shp export
  [x] ┃ bcee745e5647 drop table gn_exports.t_exports_logs
  [x] ┸ 1db24d9b23bc declare available permissions
[geonature ✓]
  [x] ┰ f06cc80cc8ba geonature schemas 2.7.5
  [x] ┃ c0fdf2ee7f4f auto update cor_area_synthese
  [x] ┃ 7077aa76da3d bump dependencies
  [x] ┃ 2a2e5c519fd1 fix gn_synthese.get_default_nomenclature_value
  [x] ┃ 5f4c4b644844 delete cascade on  cor_dataset_territory and cor_dataset_protocol
  [x] ┃ 2aa558b1be3a add schema gn_profiles
  [x] ┃ 1eb624249f2b add default value in additionalFields bib
  [x] ┃ 7471f51011c8 change index_vm_valid_profiles_cd_ref to unique index
  [x] ┃ 6f7d5549d49e delete view v_synthese_validation_forwebapp
  [x] ┣┓ dde31e76ce45 remove old profile function
  [x]  ┃ 61e46813d621 Update synthese sensitivity
  [x]  ┃ dfec5f64ac73 Fix sensitivity algorithm
  [x]  ┃ ac08dcf3f27b Do not auto-compute diffusion_level
  [x] ┃ 30edd97ae582 Remove gn_export.t_config_exports
  [x] ┣┛ 1dbc45309d6e Merge sensitivity
  [x] ┃ ca052245c6ec remove local srid
  [x] ┃ 095da7bc6667 add table gn_synthese.bib_reports_types
  [x] ┃ 829a376daa52 add table gn_synthese.t_reports
  [x] ┃ ca0fe5d21ea2 remove v_synthese_decode_nomenclatures
  [x] ┃ 74908bad752e add_altitude_calculation_in_t_base_site
  [x] ┃ 77a3bc6628d2 additional fields: add datalist widget
  [x] ┃ d80835fb13c8 Remove gn_sensitivity.cor_sensitivity_synthese
  [x] ┃ 6070edb31013 Set constraint check_cor_af_territory NOT VALID
  [x] ┃ f4ffdc68072c add id_module in t_sources
  [x] ┃ 8d90ab5e686d Add profiles default parameters
  [x] ┃ 07f10bbb4f3b add mobile app settings url
  [x] ┃ 42040535a20e add ng_module column in t_modules
  [x] ┃ 4b5478df71cb Update synthese sensitivity, including previously NULL rows
  [x] ┃ 2d7edda45dd4 set cascade on FK referencing sensitivity rules
  [x] ┃ 36d0bd313a47 add notification schema, tables and data
  [x] ┃ 4cf3fd5d06f5 set not-null on synthese.id_source
  [x] ┃ 09a637f06b96 Default notification rules
  [x] ┃ 8888e5cce63b add index on id_area for table cor_area_synthese
  [x] ┃ 497f52d996dd TAdditionalFields : remove useless columns and values
  [x] ┃ 0cae32a010ea lstrip static/medias/ from t_medias.media_path
  [x] ┃ 5d65f9c93a32 fix permissions view
  [x] ┃ 8279ce74006b set modules default type
  [x] ┃ 05a91edb6796 Improve the view gn_synthese.v_export_for_synthese
  [x] ┃ cec41a6d3a15 revome v_roles_permissions
  [x] ┃ 9e9218653d6c add synthese log history
  [x] ┃ cf1c1fdbde77 correction-sql-on-delete-module
  [x] ┃ e2a94808cf76 add notifications object
  [x] ┃ 95acee9f0452 add comment notification
  [x] ┃ df5a5099e084 add additional fields object
  [x] ┃ 0630b93bcfe0 add permissions inherited modules objects
  [x] ┃ 7fe46b0e4729 multiple filters per permission
  [x] ┃ f051b88a57fd permissions available
  [x] ┃ f1dd984bff97 add sensitivity filter
  [x] ┃ 446e902a14e7 add id_module to v_synthese_for_web_app
  [x] ┃ d99a7c22cc3c add_column_group_inpn_to_v_synthese_for_web_app
  [x] ┃ 5a2c9c65129f add sensitivity filter export synthese
  [x] ┸ 9f4db1786c22 add group3 inpn to synthese views
[geonature-samples]
  [ ] ─ 3d0bf4ee67d1 geonature samples
[habitats ✓]
  [x] ─ 62e63cd6135d create ref_habitats schema
[habitats_inpn_data ✓]
  [x] ┰ 46e91e738845 insert inpn data in ref_habitats schema
  [x] ┸ 805442837a68 correction on habref data
[ign_bd_alti ✓]
  [x] ─ 1715cf31a75d Insert default French DEM (IGN 250m BD alti)
[ign_bd_alti_vector ✓]
  [x] ─ 87651375c2e8 Vectorize French DEM
[import ✓]
  [x] ┰ 4b137deaf201 create_import_schema
  [x] ┃ 3a65de65b697 Refactoring of database structure
  [x] ┃ 2ed6a7ee5250 Add two columns
  [x] ┃ 75f0f9906bf1 add_columns
  [x] ┃ bf80cb5679be remove step field
  [x] ┃ 6470a2141c83 mappings
  [x] ┃ 906231e8f8e0 remove temporary tables
  [x] ┃ 0e4f9da0e33f remove in_error column
  [x] ┃ 61e11414f177 add detected separator
  [x] ┃ 74058f69828a remove t_imports.is_finished
  [x] ┃ eb217f32d7d7 add id_area_attachment
  [x] ┃ 681062ef2939 add date error
  [x] ┃ 699c25251384 Update fields and themes
  [x] ┃ 627b7968a55b date min/max too low
  [x] ┃ cadfdaa42430 add task_uuid
  [x] ┃ 6f60b0b934b1 erroneous rows
  [x] ┃ 0ff8fc0b4233 remove_archive_schema
  [x] ┃ 5c31e356cedc add loaded column
  [x] ┃ f394a5edcb56 on delete source set null
  [x] ┃ 65defbe5027b set id_module on import sources
  [x] ┃ a11c9a2db7bb set import module type
  [x] ┃ 485a659efdcd add 'IMPORT-DONE' notification
  [x] ┃ 5158afe602d2 default notification
  [x] ┃ a89a99f68203 declare available permissions
  [x] ┃ 8611f7aab8dc allow multi select mapping
  [x] ┃ d6bf8eaf088c add missing update permission for those that had installed 2.2.0 or 2.2.1 versions
  [x] ┃ ea67bf7b6888 remove cd fk
  [x] ┸ 2896cf965dd6 unique import error
[monitorings ✓]
  [x] ┰ 362cf9d504ec create_monitoring_schema
  [x] ┃ 2003e18f248a Add type to gn_modules
  [x] ┃ e78003460441 Correction t_observation_detail
  [x] ┃ fc90d31c677f declare available permissions
  [x] ┃ 3ffeea74a9dd Rename GNM_ to MONITORINGS_
  [x] ┃ c1528c94d350 Upgrade existing permissions
  [x] ┸ 6a15625a0f4a Delete object ALL
[nomenclatures ✓]
  [x] ┰ 6015397d686a create ref_nomenclature schema 1.3.9
  [x] ┃ 11e7741319fd fix ref_nomenclatures.get_default_nomenclature_value
  [x] ┃ f8c2c8482419 fix ref_nomenclatures.get_default_nomenclature_value
  [x] ┸ b820c66d8daa fix ref_nomenclatures.get_nomenclature_label
[nomenclatures_inpn_data ✓]
  [x] ┰ 96a713739fdd insert inpn data in ref_nomenclatures
  [x] ┃ 618542880d1f fix typo in nomenclature type definition
  [x] ┸ ee1146f6c0f4 Add UICN Red List
[nomenclatures_taxonomie ✓]
  [x] ┰ f5436084bf17 add support for taxonomy into ref_nomenclatures
  [x] ┸ 803524258bd3 add group3_inpn cor_taxref_nomenclature
[nomenclatures_taxonomie_data]
  [ ] ─ a763fb554ff2 insert taxonomic filtering data in ref_nomenclatures.cor_taxref_nomenclatures
[occhab ✓]
  [x] ┰ 2984569d5df6 create occhab schema
  [x] ┸ 85efc9bb5a47 declare permissions
[occhab-samples]
  [ ] ─ 21f661247023 insert occhab sample data
[occtax ✓]
  [x] ┰ 29c199e07eaa create occtax schema
  [x] ┃ addb71d8efad create occtax export view
  [x] ┃ f57107d2d0ad fix get_default_nomenclature_value
  [x] ┃ 494cb2245a43 trigger comportement
  [x] ┃ 944072911ff7 update synthese data (bug occtax trigger)
  [x] ┃ 22c2851bc387 add database default value
  [x] ┃ 023b0be41829 add id_module in pr_occtax.t_releves
  [x] ┃ c26c770b00ae fix occtax trigger additionnal data + trigger occ
  [x] ┃ 9624348fea40 restore occtax missing counting
  [x] ┃ 576cbd26b012 default value for id_nomenclature_observations_status
  [x] ┃ 61802a0f83b8 Fix OccTax triggers to synthese
  [x] ┃ df088920b2f3 set not null on t_releves_occtax.id_module
  [x] ┃ 4c97453a2d1a add missing id module in t_sources
  [x] ┃ 9668b861bdb6 remove v_releve_occtax
  [x] ┃ 0ff94776a962 t_releves triggers optimization
  [x] ┃ 1b4f44762020 update cd_hab in fct_tri_synthese_update_releve
  [x] ┃ e170d1902137 declare permissions
  [x] ┸ 43ecf0836b4a invert count default
[occtax-samples]
  [ ] ┰ cce08a64eb4f insert occtax sample data (noop)
  [ ] ┸ 87705981de5e insert occtax sample data
[occtax-samples-test]
  [ ] ─ 2a0ab7644e1c occtax sample test
[psdrf ✓]
  [x] ┰ e04a349457e4 create_pr_psdrf_schema
  [x] ┃ 51c7904d2aa3 Switch IDs to UUID in PSDRF module
  [x] ┃ df4e089bad97 Pass diam_lim and coeff from TCycles into CorCyclesPlacettes
  [x] ┸ 2115ba146beb Migration pour la synchronicite (created_by, created_on)
[ref_geo ✓]
  [x] ┰ 6afe74833ed0 ref_geo schema
  [x] ┃ e0ac4c9f5c0a add indexes on FK referencing l_areas.id_area
  [x] ┃ 4882d6141a41 add regions in area types
  [x] ┃ 681306b27407 fix altitude trigger
  [x] ┃ cb038e76d59c fix functions local srid
  [x] ┃ f7374cd6e38d add linears
  [x] ┃ dea1645de8c0 Référentiel point, cor (area, linear, point)
  [x] ┃ 795f6ea8ec45 cor_areas & cor_linear_areas
  [x] ┃ bc2fcc772b46 Add column LAreas.geom_4326
  [x] ┸ f22d70b8fcfa add areas types size hierarchy
[ref_geo_fr_departments ✓]
  [x] ─ 3fdaa1805575 Insert French departments in ref_geo
[ref_geo_fr_municipalities ✓]
  [x] ┰ 0dfdbfbccd63 Insert French municipalities in ref_geo
  [x] ┸ fda887e7b578 empty message
[ref_geo_fr_regions ✓]
  [x] ─ d02f4563bebe Insert French regions in ref_geo
[ref_geo_fr_regions_1970 ✓]
  [x] ─ 05a0ae652c13 Insert French regions 1970-2016 in ref_geo
[ref_geo_inpn_grids_1 ✓]
  [x] ─ 586613e2faeb Insert INPN 1×1 grids in ref_geo
[ref_geo_inpn_grids_10 ✓]
  [x] ─ ede150d9afd9 Insert INPN 10×10 grids in ref_geo
[ref_geo_inpn_grids_5 ✓]
  [x] ─ 7d6e98441e4c Insert INPN 5×5 grids in ref_geo
[ref_sensitivity_inpn ✓]
  [x] ─ 7dfd0a813f86 Insert INPN rules in sensitivity referential
[sql_utils ✓]
  [x] ┰ 3842a6d800a0 Add public shared functions
  [x] ┸ ba207b468e31 create fr_numeric collation
[taxhub ✓]
  [x] ┰ fa5a90853c45 taxhub
  [x] ┸ 64d38dbe7739 taxonomie
[taxhub-admin ✓]
  [x] ─ 3fe8c07741be taxhub
[taxonomie ✓]
  [x] ┰ 9c2c0254aadc create taxonomie schema version 1.8.1
  [x] ┃ 7540702c6407 cd_ref utility functions
  [x] ┃ 98035939bc0d find_all_taxons_parents
  [x] ┃ c93cbb35cfe4 set default value for id_liste
  [x] ┃ 4fb7e197d241 create taxonomie.v_bdc_status view
  [x] ┃ d768a5da908c add bdc_status indexes
  [x] ┃ 4a549132d156 Add unique constraints
  [x] ┃ c4415009f164 Taxref v15 db structure
  [x] ┃ 1b1a3f5cd107 Add table to link bdc_status and ref_geo
  [x] ┃ f2c36312b3de fix vm_taxref_for_autocomplete
  [x] ┃ 27fd7e2b4b79 Add vm_taxref_list_forautocomplete index
  [x] ┃ 188bc535258a Drop old status table
  [x] ┃ 23c25552d707 Create bdc_status_table if not exists
  [x] ┃ 6607b25b2d66 Taxref : set null to empty string
  [x] ┃ 3bd542b72955 optimize_vm_taxref_for_autocomplete
  [x] ┃ 32c5ed42bdbd Add table: t_meta_taxref
  [x] ┃ 33e20a7682b4 check_group3_inpn_vm_and_function
  [x] ┸ 8f3256f60915 group3_inpn_autocomplete
[usershub ✓]
  [x] ┰ 9445a69f2bed UsersHub
  [x] ┸ 6ec215fe023e upgrade utilisateurs schema
[usershub-samples ✓]
  [x] ─ f63a8f44c969 UsersHub samples data
[utilisateurs ✓]
  [x] ┰ fa35dfe5ff27 utilisateurs schema 1.4.7 (usershub 2.1.3)
  [x] ┃ 830cc8f4daef add additional_data field to bib_organismes
  [x] ┃ 5b334b77f5f5 fix v_roleslist_forall_applications
  [x] ┃ 951b8270a1cf add unique constraint on bib_organismes.uuid_organisme
  [x] ┃ 10e87bc144cd get_id_role_by_name()
  [x] ┃ 112ccf1024ce add unique constraint on t_roles UUID
  [x] ┃ f4bf21ac6238 fix temp user organism size
  [x] ┸ f9d3b95946cd set code_profil in integer
[utilisateurs-samples ✓]
  [x] ─ 72f227e37bdf utilisateurs sample data
[validation ✓]
  [x] ┰ df93a68242ee declare permissions
  [x] ┸ 9a4b4b6f8fe6 add_fct_auto_validation
MoulinZ commented 1 month ago

En tout cas j'ai vérifié, le champs code_profil est bien passé en integer, donc tout doit être bon.