An automatic syntax check in the CI should be enough but a full PgSQL test
suite would be great!

I've found that utility that can be useful for CI tests:
https://github.com/markdrago/pgsanity
It checks requests against the PgSQL parser.

*Raphaël Doursenaud*
Directeur technique (CTO)
Expert certifié en déploiement Google Apps
<https://gpcsolutions.fr/raphael-doursenaud-google-apps-certified-deployment-specialist>
+33 (0)5 35 53 97 13 - +33 (0)6 68 48 20 10

2015-11-06 11:03 GMT+01:00 Florian HENRY <[email protected]>:

> Hello All,
>
>     During solving an issue
> https://github.com/Dolibarr/dolibarr/issues/3912
>     I've meet some bad SQL practice into core sql migration files.
>
>     As dolibarr is PgSql comptabile we must keep in mind some SQL rules :
>         for exemple
>             ALTER TABLE llx_societe_rib ADD COLUMN frstrecur varchar(16)
> *default* 'FRST' *after* rum;
>         will not work in pgsql (due to our SQL wrapper
> /core/db/pgsql.class.php)
>             ALTER TABLE llx_societe_rib ADD COLUMN frstrecur varchar(16)
> *DEFAULT* 'FRST' *AFTER* rum;
>         is the good syntax
>
>     a PR is on is way with this fix on 3.8 branch
> https://github.com/Dolibarr/dolibarr/pull/3911
>
>     Should we include into test unit pgsql migration script ?
>
> Regards
>
> --
> Florian Henry+33 6 03 76 48 
> [email protected]http://www.open-concept.pro
> Twitter : @_Open_Concept_
> Google+ : https://www.google.com/+Open-conceptPro
>
>
> _______________________________________________
> Dolibarr-dev mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/dolibarr-dev
>
>

-- 
 <http://gpcsolutions.fr>
http://gpcsolutions.fr
Technopole Hélioparc
2 avenue du Président Pierre Angot
64053 PAU CEDEX 9
SARL GPC.solutions au capital de 7 500 € - R.C.S. PAU 528 995 921
<http://wiki.dolibarr.org/index.php/Dolibarr_suppliers_France#GPC.solutions>
_______________________________________________
Dolibarr-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

Répondre à