db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1439194 - /db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mssql/dropTable.vm
Date Sun, 27 Jan 2013 21:47:18 GMT
Author: tfischer
Date: Sun Jan 27 21:47:18 2013
New Revision: 1439194

URL: http://svn.apache.org/viewvc?rev=1439194&view=rev
Log:
use unqualified names for querying tables to be dropped (tested for mssql 2012)

Modified:
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mssql/dropTable.vm

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mssql/dropTable.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mssql/dropTable.vm?rev=1439194&r1=1439193&r2=1439194&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mssql/dropTable.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mssql/dropTable.vm
Sun Jan 27 21:47:18 2013
@@ -20,7 +20,7 @@
 IF EXISTS (SELECT 1 FROM sysobjects WHERE type ='RI' AND name='$foreignKeyName')
     ALTER TABLE $name DROP CONSTRAINT $foreignKeyName;
 #end
-IF EXISTS (SELECT 1 FROM sysobjects WHERE type = 'U' AND name = '$name')
+IF EXISTS (SELECT 1 FROM sysobjects WHERE type = 'U' AND name = '$unqualifiedName')
 BEGIN
 #set ($counter = ${torqueGen.getCounter()})
      DECLARE @reftable_${counter} nvarchar(60), @constraintname_${counter} nvarchar(60)



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


Mime
View raw message