26 lines
1,018 B
PL/PgSQL
26 lines
1,018 B
PL/PgSQL
-- upgrade script to migrate the Koji database schema
|
|
-- from version 1.17 to 1.18
|
|
|
|
|
|
BEGIN;
|
|
|
|
-- new table for notifications' optouts
|
|
CREATE TABLE build_notifications_block (
|
|
id SERIAL NOT NULL PRIMARY KEY,
|
|
user_id INTEGER NOT NULL REFERENCES users (id),
|
|
package_id INTEGER REFERENCES package (id),
|
|
tag_id INTEGER REFERENCES tag (id)
|
|
) WITHOUT OIDS;
|
|
|
|
-- add tgz to list of tar's extensions
|
|
UPDATE archivetypes SET extensions = 'tar tar.gz tar.bz2 tar.xz tgz' WHERE name = 'tar';
|
|
INSERT INTO archivetypes (name, description, extensions) VALUES ('vhdx', 'Hyper-V Virtual Hard Disk v2 image', 'vhdx');
|
|
|
|
-- add compressed raw-gzip and compressed qcow2 images
|
|
insert into archivetypes (name, description, extensions) values ('raw-gz', 'GZIP compressed raw disk image', 'raw.gz');
|
|
insert into archivetypes (name, description, extensions) values ('qcow2-compressed', 'Compressed QCOW2 image', 'qcow2.gz qcow2.xz');
|
|
|
|
-- add better index for sessions
|
|
CREATE INDEX sessions_expired ON sessions(expired);
|
|
|
|
COMMIT;
|