Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/libsvn_wc/wc-metadata.sql view on Meta::CPAN
DROP INDEX I_NODES_PARENT;
CREATE UNIQUE INDEX I_NODES_PARENT ON NODES (wc_id, parent_relpath,
local_relpath, op_depth);
DROP INDEX I_ACTUAL_PARENT;
CREATE UNIQUE INDEX I_ACTUAL_PARENT ON ACTUAL_NODE (wc_id, parent_relpath,
local_relpath);
PRAGMA user_version = 31;
-- STMT_UPGRADE_31_SELECT_WCROOT_NODES
/* Select all base nodes which are the root of a WC, including
switched subtrees, but excluding those which map to the root
of the repos.
### IPROPS: Is this query horribly inefficient? Quite likely,
### but it only runs during an upgrade, so do we care? */
SELECT l.wc_id, l.local_relpath FROM nodes as l
LEFT OUTER JOIN nodes as r
ON l.wc_id = r.wc_id
AND r.local_relpath = l.parent_relpath
AND r.op_depth = 0
WHERE l.op_depth = 0
AND l.repos_path != ''
AND ((l.repos_id IS NOT r.repos_id)
OR (l.repos_path IS NOT RELPATH_SKIP_JOIN(r.local_relpath, r.repos_path, l.local_relpath)))
/* ------------------------------------------------------------------------- */
/* Format 32 .... */
-- STMT_UPGRADE_TO_32
/* Drop old index. ### Remove this part from the upgrade to 31 once bumped */
DROP INDEX IF EXISTS I_ACTUAL_CHANGELIST;
DROP INDEX IF EXISTS I_EXTERNALS_PARENT;
CREATE INDEX I_EXTERNALS_PARENT ON EXTERNALS (wc_id, parent_relpath);
DROP INDEX I_NODES_PARENT;
CREATE UNIQUE INDEX I_NODES_PARENT ON NODES (wc_id, parent_relpath,
local_relpath, op_depth);
DROP INDEX I_ACTUAL_PARENT;
CREATE UNIQUE INDEX I_ACTUAL_PARENT ON ACTUAL_NODE (wc_id, parent_relpath,
local_relpath);
/* ------------------------------------------------------------------------- */
/* Format YYY introduces new handling for conflict information. */
-- format: YYY
/* ------------------------------------------------------------------------- */
/* Format 99 drops all columns not needed due to previous format upgrades.
Before we release 1.7, these statements will be pulled into a format bump
and all the tables will be cleaned up. We don't know what that format
number will be, however, so we're just marking it as 99 for now. */
-- format: 99
/* TODO: Un-confuse *_revision column names in the EXTERNALS table to
"-r<operative> foo@<peg>", as suggested by the patch attached to
http://svn.haxx.se/dev/archive-2011-09/0478.shtml */
/* TODO: Remove column parent_relpath from EXTERNALS. We're not using it and
never will. It's not interesting like in the NODES table: the external's
parent path may be *anything*: unversioned, "behind" a another WC... */
/* Now "drop" the tree_conflict_data column from actual_node. */
CREATE TABLE ACTUAL_NODE_BACKUP (
wc_id INTEGER NOT NULL,
local_relpath TEXT NOT NULL,
parent_relpath TEXT,
properties BLOB,
conflict_old TEXT,
conflict_new TEXT,
conflict_working TEXT,
prop_reject TEXT,
changelist TEXT,
text_mod TEXT
);
INSERT INTO ACTUAL_NODE_BACKUP SELECT
wc_id, local_relpath, parent_relpath, properties, conflict_old,
conflict_new, conflict_working, prop_reject, changelist, text_mod
FROM ACTUAL_NODE;
DROP TABLE ACTUAL_NODE;
CREATE TABLE ACTUAL_NODE (
wc_id INTEGER NOT NULL REFERENCES WCROOT (id),
local_relpath TEXT NOT NULL,
parent_relpath TEXT,
properties BLOB,
conflict_old TEXT,
conflict_new TEXT,
conflict_working TEXT,
prop_reject TEXT,
changelist TEXT,
text_mod TEXT,
PRIMARY KEY (wc_id, local_relpath)
);
CREATE UNIQUE INDEX I_ACTUAL_PARENT ON ACTUAL_NODE (wc_id, parent_relpath,
local_relpath);
INSERT INTO ACTUAL_NODE SELECT
wc_id, local_relpath, parent_relpath, properties, conflict_old,
conflict_new, conflict_working, prop_reject, changelist, text_mod
FROM ACTUAL_NODE_BACKUP;
DROP TABLE ACTUAL_NODE_BACKUP;
/* Note: Other differences between the schemas of an upgraded and a
* fresh WC.
*
* While format 22 was current, "NOT NULL" was added to the
* columns PRISTINE.size and PRISTINE.md5_checksum. The format was not
* bumped because it is a forward- and backward-compatible change.
*
* While format 23 was current, "REFERENCES PRISTINE" was added to the
* columns ACTUAL_NODE.older_checksum, ACTUAL_NODE.left_checksum,
( run in 0.456 second using v1.01-cache-2.11-cpan-e1769b4cff6 )