roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r674322 - in /roller/trunk: apps/weblogger/src/sql/400-to-410-migration.vm metadata/database/macros.vm
Date Sun, 06 Jul 2008 17:48:20 GMT
Author: snoopdave
Date: Sun Jul  6 10:48:20 2008
New Revision: 674322

URL: http://svn.apache.org/viewvc?rev=674322&view=rev
Log:
Using SQL-92 form of concatenation for all databases except MySQL

Modified:
    roller/trunk/apps/weblogger/src/sql/400-to-410-migration.vm
    roller/trunk/metadata/database/macros.vm

Modified: roller/trunk/apps/weblogger/src/sql/400-to-410-migration.vm
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/sql/400-to-410-migration.vm?rev=674322&r1=674321&r2=674322&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/src/sql/400-to-410-migration.vm (original)
+++ roller/trunk/apps/weblogger/src/sql/400-to-410-migration.vm Sun Jul  6 10:48:20 2008
@@ -19,17 +19,17 @@
 );
 
 insert into roller_permission (id,username,actions,objectid,objecttype,pending,datecreated)

-   select concat(w.id,u.username), u.username, 'edit_draft', w.handle, 'Weblog', 0, current_timestamp
+   select #concat("w.id" "u.username"), u.username, 'edit_draft', w.handle, 'Weblog', 0,
current_timestamp
       from rolleruser as u, website as w, roller_user_permissions as p
       where p.user_id = u.id and p.website_id = w.id and permission_mask = 1;
 
 insert into roller_permission (id,username,actions,objectid,objecttype,pending,datecreated)

-   select concat(w.id,u.username), u.username, 'author', w.handle, 'Weblog', 0, current_timestamp
+   select #concat("w.id" "u.username"), u.username, 'author', w.handle, 'Weblog', 0, current_timestamp
       from rolleruser as u, website as w, roller_user_permissions as p
       where p.user_id = u.id and p.website_id = w.id and permission_mask = 2;
 
 insert into roller_permission (id,username,actions,objectid,objecttype,pending,datecreated)

-   select concat(w.id,u.username), u.username, 'admin', w.handle, 'Weblog', 0, current_timestamp
+   select #concat("w.id" "u.username"), u.username, 'admin', w.handle, 'Weblog', 0, current_timestamp
       from rolleruser as u, website as w, roller_user_permissions as p
       where p.user_id = u.id and p.website_id = w.id and permission_mask = 3;
 

Modified: roller/trunk/metadata/database/macros.vm
URL: http://svn.apache.org/viewvc/roller/trunk/metadata/database/macros.vm?rev=674322&r1=674321&r2=674322&view=diff
==============================================================================
--- roller/trunk/metadata/database/macros.vm (original)
+++ roller/trunk/metadata/database/macros.vm Sun Jul  6 10:48:20 2008
@@ -115,3 +115,5 @@
 #end
 #end
 
+
+#macro(concat $s1 $s2) #if ($db.DBTYPE != "MYSQL") $s1 || $s2 #else concat($s1, $s2) #end
#end



Mime
View raw message