pkgsrc/devel/p5-BackPAN-Index/patches/patch-aa
seb 0b10dbf795 Initial import of p5-BackPAN-Index version 0.39 in the NetBSD
Packages Collection.

The Perl 5 module BackPAN::Index provides an index of BackPAN and
some handy methods.  The Comprehensive Perl Archive Network (CPAN)
is a very useful collection of Perl code. However, in order to keep
CPAN relatively small, authors of modules can delete older versions
of modules to only let CPAN have the latest version of a module.
BackPAN is where these deleted modules are backed up. It's more
like a full CPAN mirror, only without the deletions.
2010-07-11 20:09:31 +00:00

36 lines
1.4 KiB
Text

$NetBSD: patch-aa,v 1.1.1.1 2010/07/11 20:09:31 seb Exp $
From http://github.com/acme/parse-backpan-packages.git
Commit 2752cc6c816fe965711d
>Recent change to DBIx::Class doesn't like nullable foreign keys,
>not that we really need them
--- lib/BackPAN/Index.pm.orig 2010-04-17 17:20:07.000000000 +0000
+++ lib/BackPAN/Index.pm
@@ -240,14 +240,14 @@ sub _setup_database {
my %create_for = (
files => <<'SQL',
CREATE TABLE IF NOT EXISTS files (
- path TEXT PRIMARY KEY,
+ path TEXT NOT NULL PRIMARY KEY,
date INTEGER NOT NULL,
size INTEGER NOT NULL CHECK ( size >= 0 )
)
SQL
releases => <<'SQL',
CREATE TABLE IF NOT EXISTS releases (
- path TEXT PRIMARY KEY REFERENCES files,
+ path TEXT NOT NULL PRIMARY KEY REFERENCES files,
dist TEXT NOT NULL REFERENCES dists,
date INTEGER NOT NULL,
size TEXT NOT NULL,
@@ -260,7 +260,7 @@ SQL
dists => <<'SQL',
CREATE TABLE IF NOT EXISTS dists (
- name TEXT PRIMARY KEY,
+ name TEXT NOT NULL PRIMARY KEY,
first_release TEXT NOT NULL REFERENCES releases,
latest_release TEXT NOT NULL REFERENCES releases,
first_date INTEGER NOT NULL,