-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add common sql default value, remove db_column french #3055
Conversation
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
Codecov Report
@@ Coverage Diff @@
## master #3055 +/- ##
=======================================
Coverage 97.48% 97.48%
=======================================
Files 261 261
Lines 17809 17809
=======================================
Hits 17361 17361
Misses 448 448
Continue to review full report at Codecov.
|
geotrek/common/models.py
Outdated
help_text=_("Original creator")) | ||
title = models.CharField(blank=True, default='', max_length=128, | ||
db_column='titre', verbose_name=_(u"Filename"), | ||
verbose_name=_(u"Filename"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verbose_name=_(u"Filename"), | |
verbose_name=_("Filename"), |
geotrek/common/models.py
Outdated
help_text=_("Renames the file")) | ||
legend = models.CharField(blank=True, default='', max_length=128, | ||
db_column='legende', verbose_name=_(u"Legend"), | ||
verbose_name=_(u"Legend"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verbose_name=_(u"Legend"), | |
verbose_name=_("Legend"), |
Attention @IdrissaD, dans la prochaine version, on ajoute des valeurs par défaut sur tous les champs où cela est pertinent. Il faudra alors revoir la vue du schéma de données qui fait appel à ces champs en français : https://github.com/PnX-SI/schema_randonnee/blob/master/geotrek/v_treks_schema.sql @LePetitTim pour ceux qui ont des vues ou autres utilisant la BDD, il faudrait indiquer dans le Changelog les champs des attachments qui ont été renommés en anglais. |
ALTER TABLE common_attachment ALTER COLUMN uuid SET DEFAULT gen_random_uuid(); | ||
ALTER TABLE common_attachment ALTER COLUMN attachment_video SET DEFAULT ''; | ||
ALTER TABLE common_attachment ALTER COLUMN attachment_link SET DEFAULT ''; | ||
-- filetype |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mettre une valeur par défaut sur le champs attachment_file
, si on ne remplit que attachment_link
?
ALTER TABLE common_attachment ALTER COLUMN starred SET DEFAULT False; | ||
ALTER TABLE common_attachment ALTER COLUMN is_image SET DEFAULT False; | ||
ALTER TABLE common_attachment ALTER COLUMN date_insert SET DEFAULT now(); | ||
ALTER TABLE common_attachment ALTER COLUMN date_update SET DEFAULT now(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Supprimer le champs creation_date
de cette table qui ne semble pas utilisé et semble redondant avec date_insert
?
-- geom | ||
ALTER TABLE core_topology ALTER COLUMN uuid SET DEFAULT gen_random_uuid(); | ||
-- geom_3d | ||
ALTER TABLE core_topology ALTER COLUMN "length" SET DEFAULT 0.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ligne redondante, définie quelques lignes plus haut.
ALTER TABLE core_path ALTER COLUMN eid SET DEFAULT ''; | ||
ALTER TABLE core_path ALTER COLUMN draft SET DEFAULT False; | ||
ALTER TABLE core_path ALTER COLUMN uuid SET DEFAULT gen_random_uuid(); | ||
ALTER TABLE core_path ALTER COLUMN geom_3d SET DEFAULT NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ALTER TABLE core_path ALTER COLUMN geom_3d SET DEFAULT NULL; | |
ALTER TABLE core_path ALTER COLUMN geom_3d SET DEFAULT NULL; |
default is already null on nullable columns
ALTER TABLE core_topology ALTER COLUMN geom_need_update SET DEFAULT FALSE; | ||
-- geom | ||
ALTER TABLE core_topology ALTER COLUMN uuid SET DEFAULT gen_random_uuid(); | ||
ALTER TABLE core_topology ALTER COLUMN geom_3d SET DEFAULT NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ALTER TABLE core_topology ALTER COLUMN geom_3d SET DEFAULT NULL; | |
ALTER TABLE core_topology ALTER COLUMN geom_3d SET DEFAULT NULL; |
idem
-- InterventionStatus | ||
--------------------- | ||
-- status | ||
ALTER TABLE maintenance_interventionstatus ALTER COLUMN "order" SET DEFAULT NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ALTER TABLE maintenance_interventionstatus ALTER COLUMN "order" SET DEFAULT NULL; | |
ALTER TABLE maintenance_interventionstatus ALTER COLUMN "order" SET DEFAULT NULL; |
IDEM
No description provided.