From d520a9fc95c16c1cb5e1713ac590f233295fff8f Mon Sep 17 00:00:00 2001
From: Marco Villegas <marvil07@gmail.com>
Date: Thu, 11 Nov 2010 22:22:08 -0500
Subject: [PATCH] re-add lock as column for repo table instead of using data field.

---
 versioncontrol.install |   26 +++++++++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 deletions(-)

diff --git versioncontrol.install versioncontrol.install
index 7f191b5..f5ea19e 100644
--- versioncontrol.install
+++ versioncontrol.install
@@ -359,6 +359,12 @@ function versioncontrol_schema() {
         'not null' => TRUE,
         'default' => 1
       ),
+      'locked' => array(
+        'description' => '1 locked repository, 0 unlocked.',
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
       'data' => array(
         'description' => t('A serialized array of additional per-repository settings, mostly populated by backends.'),
         'type' => 'text',
@@ -647,7 +653,7 @@ function versioncontrol_update_6301() {
 }
 
 /**
- * Add the 'updated', 'updated_method' and 'locked' columns.
+ * Add the 'updated' and 'updated_method' columns.
  *
  * These fields were previously stored as members of a serialized array stored
  * in the data column but this could be problematic for views integration and
@@ -682,6 +688,24 @@ function versioncontrol_update_6302() {
 }
 
 /**
+ * Add 'locked' column.
+ *
+ * This field was previously stored as members of a serialized array stored
+ * in the data column. Now an independent field.
+ */
+function versioncontrol_update_6303() {
+  $ret = array();
+  $locked = array(
+    'description' => '1 locked repository, 0 unlocked.',
+    'type' => 'int',
+    'not null' => TRUE,
+    'default' => 0,
+  );
+  db_add_field($ret, 'versioncontrol_repositories', 'locked', $locked);
+  return $ret;
+}
+
+/**
  * Rename {versioncontrol_accounts}.username to
  * {versioncontrol_accounts}.vcs_username.
  *
-- 
1.7.2.3

