-
Notifications
You must be signed in to change notification settings - Fork 41
/
pkgin.sql
197 lines (187 loc) · 3.77 KB
/
pkgin.sql
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
CREATE TABLE [PKGDB] (
"PKGDB_MTIME" INTEGER,
"PKGDB_NTIME" INTEGER
);
CREATE TABLE [REPOS] (
"REPO_URL" TEXT UNIQUE,
"REPO_MTIME" INTEGER
);
CREATE TABLE [REMOTE_PKG] (
"PKG_ID" INTEGER PRIMARY KEY,
"FULLPKGNAME" TEXT UNIQUE,
"PKGNAME" TEXT,
"PKGVERS" TEXT,
"BUILD_DATE" TEXT,
"COMMENT" TEXT,
"LICENSE" TEXT NULL,
"PKGTOOLS_VERSION" TEXT,
"HOMEPAGE" TEXT NULL,
"OS_VERSION" TEXT,
"PKGPATH" TEXT,
"PKG_OPTIONS" TEXT NULL,
"CATEGORIES" TEXT,
"SIZE_PKG" TEXT,
"FILE_SIZE" TEXT,
"OPSYS" TEXT,
"REPOSITORY" TEXT
);
CREATE TABLE [LOCAL_PKG] (
"PKG_ID" INTEGER PRIMARY KEY,
"FULLPKGNAME" TEXT UNIQUE,
"PKGNAME" TEXT,
"PKGVERS" TEXT,
"BUILD_DATE" TEXT,
"COMMENT" TEXT,
"LICENSE" TEXT NULL,
"PKGTOOLS_VERSION" TEXT,
"HOMEPAGE" TEXT NULL,
"OS_VERSION" TEXT,
"PKGPATH" TEXT,
"PKG_OPTIONS" TEXT NULL,
"CATEGORIES" TEXT,
"SIZE_PKG" TEXT,
"FILE_SIZE" TEXT,
"OPSYS" TEXT,
"PKG_KEEP" INTEGER NULL
);
/*
* CONFLICTS
*/
CREATE TABLE local_conflicts (
pkg_id INTEGER,
pattern TEXT NOT NULL,
pkgbase TEXT
);
CREATE INDEX idx_local_conflicts_pkg_id ON local_conflicts (
pkg_id ASC
);
CREATE INDEX idx_local_conflicts_pattern ON local_conflicts (
pattern ASC
);
CREATE TABLE remote_conflicts (
pkg_id INTEGER,
pattern TEXT NOT NULL,
pkgbase TEXT
);
CREATE INDEX idx_remote_conflicts_pkg_id ON remote_conflicts (
pkg_id ASC
);
CREATE INDEX idx_remote_conflicts_pattern ON remote_conflicts (
pattern ASC
);
/*
* DEPENDS
*/
CREATE TABLE local_depends (
pkg_id INTEGER,
pattern TEXT NOT NULL,
pkgbase TEXT
);
CREATE INDEX idx_local_depends_pkg_id ON local_depends (
pkg_id ASC
);
CREATE INDEX idx_local_depends_pattern ON local_depends (
pattern ASC
);
CREATE TABLE remote_depends (
pkg_id INTEGER,
pattern TEXT NOT NULL,
pkgbase TEXT
);
CREATE INDEX idx_remote_depends_pkg_id ON remote_depends (
pkg_id ASC
);
CREATE INDEX idx_remote_depends_pattern ON remote_depends (
pattern ASC
);
/*
* PROVIDES
*/
CREATE TABLE local_provides (
pkg_id INTEGER,
filename TEXT
);
CREATE INDEX idx_local_provides_pkg_id ON local_provides (
pkg_id ASC
);
CREATE INDEX idx_local_provides_filename ON local_provides (
filename ASC
);
CREATE TABLE remote_provides (
pkg_id INTEGER,
filename TEXT
);
CREATE INDEX idx_remote_provides_pkg_id ON remote_provides (
pkg_id ASC
);
CREATE INDEX idx_remote_provides_filename ON remote_provides (
filename ASC
);
/*
* REQUIRES
*/
CREATE TABLE local_requires (
pkg_id INTEGER,
filename TEXT
);
CREATE INDEX idx_local_requires_pkg_id ON local_requires (
pkg_id ASC
);
CREATE INDEX idx_local_requires_filename ON local_requires (
filename ASC
);
CREATE TABLE remote_requires (
pkg_id INTEGER,
filename TEXT
);
CREATE INDEX idx_remote_requires_pkg_id ON remote_requires (
pkg_id ASC
);
CREATE INDEX idx_remote_requires_filename ON remote_requires (
filename ASC
);
/*
* SUPERSEDES
*/
CREATE TABLE remote_supersedes (
pkg_id INTEGER,
pattern TEXT NOT NULL,
pkgbase TEXT
);
CREATE INDEX idx_remote_supersedes_pkg_id ON remote_supersedes (
pkg_id ASC
);
CREATE INDEX idx_remote_supersedes_pattern ON remote_supersedes (
pattern ASC
);
/*
* +REQUIRED_BY
*/
CREATE TABLE local_required_by (
pkgname TEXT,
required_by TEXT
);
CREATE INDEX idx_local_required_by_pkgname ON local_required_by (
pkgname ASC
);
CREATE INDEX idx_local_required_by_required_by ON local_required_by (
required_by ASC
);
CREATE INDEX [idx_remote_pkg_category] ON [REMOTE_PKG] (
[CATEGORIES] ASC
);
CREATE INDEX [idx_remote_pkg_comment] ON [REMOTE_PKG] (
[COMMENT] ASC
);
CREATE INDEX [idx_remote_pkg_name] ON [REMOTE_PKG] (
[PKGNAME] ASC
);
CREATE INDEX [idx_local_pkg_category] ON [LOCAL_PKG] (
[CATEGORIES] ASC
);
CREATE INDEX [idx_local_pkg_comment] ON [LOCAL_PKG] (
[COMMENT] ASC
);
CREATE INDEX [idx_local_pkg_name] ON [LOCAL_PKG] (
[PKGNAME] ASC
);