1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
$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,
|