You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by tf...@apache.org on 2005/04/17 11:58:59 UTC

cvs commit: db-torque/src/generator/src/templates/sql/base/postgresql drop.vm

tfischer    2005/04/17 02:58:59

  Modified:    xdocs    postgres-howto.xml changes.xml
               src/generator/src/templates/sql/base/postgresql drop.vm
  Log:
  use the CASCADE option for dropping tables in PostgreSQL
  
  Revision  Changes    Path
  1.8       +28 -3     db-torque/xdocs/postgres-howto.xml
  
  Index: postgres-howto.xml
  ===================================================================
  RCS file: /home/cvs/db-torque/xdocs/postgres-howto.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- postgres-howto.xml	19 Aug 2004 02:24:49 -0000	1.7
  +++ postgres-howto.xml	17 Apr 2005 09:58:59 -0000	1.8
  @@ -8,11 +8,36 @@
   
   <body>
   
  -<section name="Introductory note">
  +  <section name="PostgreSQL versions">
  +    <p>
  +      The generator templates in Torque 3.2 are optimized for 
  +      PostgreSQL 7.3 and later.
  +      To use an older version of PostgreSQL, do the following:
  +    </p>
  +    
  +    <p>
  +      In the generator, locate the template 
  +      templates/sql/base/postgresql/drop.vm 
  +      and replace the line
  +    </p>
  +    
  +    <source>
  +DROP TABLE $table.Name CASCADE;</source>
  +    
  +    <p>
  +      by
  +    </p>
  +    
  +    <source>
  +DROP TABLE $table.Name;</source>
  +      
  +  </section>
  +
  +<section name="Note">
   
   <p>
  -This HOWTO was written some time ago and was targeted at the
  -version of Torque that was coupled with the 
  +The following sections of this HOWTO were written some time ago 
  +and were targeted at the version of Torque that was coupled with the 
   <a href="http://jakarta.apache.org/turbine/">Turbine</a> application framework.
   Contributions towards updating the information below can be submitted to the 
   <a href="mailto:torque-dev@db.apache.org">Torque Dev mailing list</a>.
  
  
  
  1.152     +5 -0      db-torque/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/db-torque/xdocs/changes.xml,v
  retrieving revision 1.151
  retrieving revision 1.152
  diff -u -r1.151 -r1.152
  --- changes.xml	30 Mar 2005 12:40:41 -0000	1.151
  +++ changes.xml	17 Apr 2005 09:58:59 -0000	1.152
  @@ -29,6 +29,11 @@
   
     <release version="3.2-dev" date="in CVS">
       <action type="fix" dev="tfischer">
  +      Use the cascade option for dropping tables in PostgreSQL.
  +      This allows to drop tables which have foreign keys.
  +      Cascade is supported since PostgreSQL 7.3
  +    </action>
  +    <action type="fix" dev="tfischer">
         Added missing templates for msaccess. I did not test it,
         so no idea whether msaccess is actually supported.
       </action>
  
  
  
  1.5       +1 -1      db-torque/src/generator/src/templates/sql/base/postgresql/drop.vm
  
  Index: drop.vm
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/templates/sql/base/postgresql/drop.vm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- drop.vm	27 Mar 2005 07:52:12 -0000	1.4
  +++ drop.vm	17 Apr 2005 09:58:59 -0000	1.5
  @@ -1,4 +1,4 @@
  -DROP TABLE $table.Name;
  +DROP TABLE $table.Name CASCADE;
   #if ($table.IdMethod == "native")
   DROP SEQUENCE $table.SequenceName;
   #end
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org