Author: rhuijben
Date: Mon May  9 21:26:28 2011
New Revision: 1101226

URL: http://svn.apache.org/viewvc?rev=1101226&view=rev
Log:
Rename a few columns while we still can to match our latest thoughts about
this (instead of the old names in NODES).

* subversion/libsvn_wc/wc-metadata.sql
  (STMT_CREATE_EXTERNALS): Rename several columns and remove NULL constraint
    from the two revisions. Update index.

* subversion/libsvn_wc/wc-queries.sql
  (STMT_INSERT_EXTERNAL,
   STMT_SELECT_EXTERNAL_INFO,
   STMT_SELECT_EXTERNAL_INFO_WITH_LOCK,
   STMT_SELECT_EXTERNALS_DEFINED): Update column names in queries.

Suggested by: gstein

Modified:
    subversion/trunk/subversion/libsvn_wc/wc-metadata.sql
    subversion/trunk/subversion/libsvn_wc/wc-queries.sql

Modified: subversion/trunk/subversion/libsvn_wc/wc-metadata.sql
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-metadata.sql?rev=1101226&r1=1101225&r2=1101226&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-metadata.sql Mon May  9 21:26:28 
2011
@@ -565,28 +565,29 @@ CREATE TABLE EXTERNALS (
   changed_author    TEXT,
 
   /* Various cache fields (NULL for directories; see NODES for explanation) */
-  translated_size  INTEGER,
-  last_mod_time  INTEGER,
+  recorded_size  INTEGER,
+  recorded_mod_time  INTEGER,
   dav_cache  BLOB,
 
 
   /* The local relpath of the directory NODE defining this external 
      (Defaults to the parent directory of the file external after upgrade) */
-  record_relpath         TEXT NOT NULL,
+  def_local_relpath         TEXT NOT NULL,
 
   /* The url of the external as used in the definition */
-  recorded_url           TEXT NOT NULL,
+  def_repos_relpath         TEXT NOT NULL,
 
   /* The operational (peg) and node revision if this is a revision fixed
      external; otherwise NULL. (Usually these will both have the same value) */
-  recorded_operational_revision  TEXT NOT NULL,
-  recorded_revision              TEXT NOT NULL,
+  def_operational_revision  TEXT,
+  def_revision              TEXT,
 
   PRIMARY KEY (wc_id, local_relpath)
 );
 
 CREATE INDEX I_EXTERNALS_PARENT ON EXTERNALS (wc_id, parent_relpath);
-CREATE UNIQUE INDEX I_EXTERNALS_RECORDED ON EXTERNALS (wc_id, record_relpath,
+CREATE UNIQUE INDEX I_EXTERNALS_RECORDED ON EXTERNALS (wc_id,
+                                                       def_local_relpath,
                                                        local_relpath);
 
 /* Format 20 introduces NODES and removes BASE_NODE and WORKING_NODE */

Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=1101226&r1=1101225&r2=1101226&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Mon May  9 21:26:28 
2011
@@ -816,24 +816,24 @@ SELECT 1 FROM actual_node WHERE wc_id = 
 INSERT OR REPLACE INTO externals (
     wc_id, local_relpath, parent_relpath, repos_id, repos_path, revision,
     kind, symlink_target, changed_revision, changed_date, changed_author,
-    record_relpath, recorded_url, recorded_operational_revision,
-    recorded_revision, checksum, properties, dav_cache)
+    def_local_relpath, def_repos_relpath, def_operational_revision,
+    def_revision, checksum, properties, dav_cache)
 VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12, ?13, ?14, ?15, ?16,
         ?17, ?18)
 
 -- STMT_SELECT_EXTERNAL_INFO
 SELECT kind, revision, repos_id, repos_path, properties, checksum,
     symlink_target, changed_revision, changed_date, changed_author,
-    translated_size, last_mod_time, record_relpath, recorded_url,
-    recorded_operational_revision, recorded_revision,
+    recorded_size, recorded_mod_time, def_local_relpath, def_repos_relpath,
+    def_operational_revision, def_revision
 FROM externals WHERE wc_id = ?1 AND local_relpath = ?2
 LIMIT 1
 
 -- STMT_SELECT_EXTERNAL_INFO_WITH_LOCK
 SELECT kind, revision, externals.repos_id, externals.repos_path, properties,
     checksum, symlink_target, changed_revision, changed_date, changed_author,
-    translated_size, last_mod_time, record_relpath, recorded_url,
-    recorded_operational_revision, recorded_revision,
+    recorded_size, recorded_mod_time, def_local_relpath, def_repos_relpath,
+    def_operational_revision, def_revision,
     lock_token, lock_owner, lock_comment, lock_date
 FROM externals
 LEFT OUTER JOIN lock ON externals.repos_id = lock.repos_id
@@ -847,7 +847,7 @@ FROM externals WHERE wc_id = ?1 AND pare
 
 -- STMT_SELECT_EXTERNALS_DEFINED
 SELECT local_relpath
-FROM externals WHERE wc_id = ?1 AND record_relpath = ?2
+FROM externals WHERE wc_id = ?1 AND def_local_relpath = ?2
 
 /* ------------------------------------------------------------------------- */
 


Reply via email to