Add arch/encoding metadata to DB + Fetch Arch Linux x86_64

The encoding metadata will be very useful in finding badly decoded man
pages. The package 'arch' is necessary to properly identify which
package was used, which is not obvious now that I'm going to switch more
systems to the (more common) x86_64 arch.
This commit is contained in:
Yorhel 2016-11-06 16:05:13 +01:00
parent b8a1945d38
commit cb81bedac1
6 changed files with 32 additions and 20 deletions

View file

@ -24,16 +24,18 @@ CREATE TABLE package_versions (
package integer NOT NULL REFERENCES packages(id) ON DELETE CASCADE,
version varchar NOT NULL,
released date NOT NULL,
arch varchar,
UNIQUE(package, version)
);
CREATE TABLE man (
package integer NOT NULL REFERENCES package_versions(id) ON DELETE CASCADE,
name varchar NOT NULL,
section varchar NOT NULL,
filename varchar NOT NULL,
locale varchar,
hash bytea NOT NULL REFERENCES contents(hash),
section varchar NOT NULL,
encoding varchar,
UNIQUE(package, filename)
);

View file

@ -0,0 +1,2 @@
ALTER TABLE package_versions ADD COLUMN arch varchar;
ALTER TABLE man ADD COLUMN encoding varchar;