You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jm...@apache.org on 2002/03/06 03:55:27 UTC
cvs commit: jakarta-turbine-torque/src/templates/sql/base/oracle primarykey.vm
jmcnally 02/03/05 18:55:27
Modified: src/templates/sql/base/oracle primarykey.vm
Log:
setting the maximum length to 30 as that is what is in db.props. It
would be better if this name used the NameGenerator
Revision Changes Path
1.3 +3 -1 jakarta-turbine-torque/src/templates/sql/base/oracle/primarykey.vm
Index: primarykey.vm
===================================================================
RCS file: /home/cvs/jakarta-turbine-torque/src/templates/sql/base/oracle/primarykey.vm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- primarykey.vm 15 Nov 2001 13:25:46 -0000 1.2
+++ primarykey.vm 6 Mar 2002 02:55:27 -0000 1.3
@@ -1,5 +1,7 @@
+#set ($length = $table.Name.length())
+#if ($length > 27)#set ($length=27)#end
#if ($table.hasPrimaryKey())
ALTER TABLE $table.Name
- ADD CONSTRAINT ${table.Name}_PK
+ ADD CONSTRAINT ${table.Name.substring(0,$length)}_PK
PRIMARY KEY ($table.printPrimaryKey());
#end
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>