db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serge Huber <shub...@jahia.com>
Subject [PATCH] [Torque-Gen] Correction for PostgreSQL drop table
Date Fri, 27 Feb 2004 17:47:43 GMT

Hi all,

I've just started using Torque Gen and I noticed there was a small problem 
when generating the scripts for PostgreSQL.
For the moment the drop.vm starts something like this :

DROP TABLE $table.Name;

The problem is that with advanced schemas containing unique and foreign 
keys, this fails because PostgreSQL build external resources attached to 
the table name. Using the following works a lot better :

DROP TABLE $table.Name CASCADE;

Also I am submitting a patch containing this and another small modification 
to the drop.vm for MSSQL that makes the resulting SQL schema file a lot 
easier to parse because every command is separate with ";" characters. I 
use this in my own templates but I thought it might be useful to others.

Regards,
   Serge Huber. 
Mime
View raw message