On 2015-12-22 17:29, Luis Falcon wrote: > On Tue, 22 Dec 2015 12:33:00 +0100 > Cédric Krier <[email protected]> wrote: > > > Hi, > > > > I'm trying to make the tests working back on GNU Heath, so I work > > module per module. So far, I have done almost half of them. > > But now I have to come back to the first module 'health' because of > > changeset 8665a21223e2 because the SQL query doesn't work on SQLite. > > (It is important to use python-sql to write portable SQL queries). > Agree. We're going on that direction, and most code has been moved to > python-sql, but for upgrades "run-once" snippets I've been using > standard SQL code, that could be used also directly from the psql > interpreter.
But it was not standard SQL code as it doesn't run on SQLite. The main issue was the usage of TRUE which is not in the SQL standard. Also the query was using an hard-coded name for the table which is against the new trytond feature that allows to change the default generated name of a Model. I think the option to copy/paste the query in psql is not so much important against the portability. Also someone who is able to find this query in the code will be able to convert it from python-sql to plain SQL. -- Cédric Krier - B2CK SPRL Email/Jabber: [email protected] Tel: +32 472 54 46 59 Website: http://www.b2ck.com/
pgpaiKARTdHZZ.pgp
Description: PGP signature
