From 40920935fc0b23334899f3a5d6b70f9bb3a7dbcd Mon Sep 17 00:00:00 2001
From: Rob Vermaas <rob.vermaas@gmail.com>
Date: Tue, 17 Nov 2009 15:24:51 +0000
Subject: [PATCH] remove revision from cached cvs inputs, and added missing
 files

---
 src/lib/Hydra/Schema/CachedCVSInputs.pm | 65 +++++++++++++++++++++++++
 src/lib/Hydra/Schema/CachedGitInputs.pm | 58 ++++++++++++++++++++++
 src/sql/hydra.sql                       |  1 -
 3 files changed, 123 insertions(+), 1 deletion(-)
 create mode 100644 src/lib/Hydra/Schema/CachedCVSInputs.pm
 create mode 100644 src/lib/Hydra/Schema/CachedGitInputs.pm

diff --git a/src/lib/Hydra/Schema/CachedCVSInputs.pm b/src/lib/Hydra/Schema/CachedCVSInputs.pm
new file mode 100644
index 00000000..9d152fb3
--- /dev/null
+++ b/src/lib/Hydra/Schema/CachedCVSInputs.pm
@@ -0,0 +1,65 @@
+package Hydra::Schema::CachedCVSInputs;
+
+# Created by DBIx::Class::Schema::Loader
+# DO NOT MODIFY THE FIRST PART OF THIS FILE
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("Core");
+__PACKAGE__->table("CachedCVSInputs");
+__PACKAGE__->add_columns(
+  "uri",
+  {
+    data_type => "text",
+    default_value => undef,
+    is_nullable => 0,
+    size => undef,
+  },
+  "module",
+  {
+    data_type => "text",
+    default_value => undef,
+    is_nullable => 0,
+    size => undef,
+  },
+  "timestamp",
+  {
+    data_type => "integer",
+    default_value => undef,
+    is_nullable => 0,
+    size => undef,
+  },
+  "lastseen",
+  {
+    data_type => "integer",
+    default_value => undef,
+    is_nullable => 0,
+    size => undef,
+  },
+  "sha256hash",
+  {
+    data_type => "text",
+    default_value => undef,
+    is_nullable => 0,
+    size => undef,
+  },
+  "storepath",
+  {
+    data_type => "text",
+    default_value => undef,
+    is_nullable => 0,
+    size => undef,
+  },
+);
+__PACKAGE__->set_primary_key("uri", "module", "sha256hash");
+
+
+# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:21:46
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fl40IZe2SZxPEQ5UgccVSQ
+
+
+# You can replace this text with custom content, and it will be preserved on regeneration
+1;
diff --git a/src/lib/Hydra/Schema/CachedGitInputs.pm b/src/lib/Hydra/Schema/CachedGitInputs.pm
new file mode 100644
index 00000000..3768ede7
--- /dev/null
+++ b/src/lib/Hydra/Schema/CachedGitInputs.pm
@@ -0,0 +1,58 @@
+package Hydra::Schema::CachedGitInputs;
+
+# Created by DBIx::Class::Schema::Loader
+# DO NOT MODIFY THE FIRST PART OF THIS FILE
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components("Core");
+__PACKAGE__->table("CachedGitInputs");
+__PACKAGE__->add_columns(
+  "uri",
+  {
+    data_type => "text",
+    default_value => undef,
+    is_nullable => 0,
+    size => undef,
+  },
+  "timestamp",
+  {
+    data_type => "integer",
+    default_value => undef,
+    is_nullable => 0,
+    size => undef,
+  },
+  "lastseen",
+  {
+    data_type => "integer",
+    default_value => undef,
+    is_nullable => 0,
+    size => undef,
+  },
+  "sha256hash",
+  {
+    data_type => "text",
+    default_value => undef,
+    is_nullable => 0,
+    size => undef,
+  },
+  "storepath",
+  {
+    data_type => "text",
+    default_value => undef,
+    is_nullable => 0,
+    size => undef,
+  },
+);
+__PACKAGE__->set_primary_key("uri", "sha256hash");
+
+
+# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WzfB4qf6XqvIll/gPFZE6Q
+
+
+# You can replace this text with custom content, and it will be preserved on regeneration
+1;
diff --git a/src/sql/hydra.sql b/src/sql/hydra.sql
index 3a4dc782..361b55e5 100644
--- a/src/sql/hydra.sql
+++ b/src/sql/hydra.sql
@@ -304,7 +304,6 @@ create table CachedGitInputs (
 create table CachedCVSInputs (
     uri           text not null,
     module        text not null,
-    revision      integer not null,
     timestamp     integer not null, -- when we first saw this hash
     lastSeen      integer not null, -- when we last saw this hash
     sha256hash    text not null,