Merge lp:~al-maisan/launchpad/psds-399186 into lp:launchpad/db-devel
Proposed by
Muharem Hrnjadovic
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~al-maisan/launchpad/psds-399186 |
Merge into: | lp:launchpad/db-devel |
Diff against target: |
223 lines 4 files modified
database/schema/comments.sql (+10/-1) database/schema/patch-2207-06-0.sql (+122/-0) database/schema/security.cfg (+5/-0) database/schema/trusted.sql (+15/-0) |
To merge this branch: | bzr merge lp:~al-maisan/launchpad/psds-399186 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonathan Lange (community) | db | Approve | |
Stuart Bishop (community) | db | Approve | |
Review via email: mp+13959@code.launchpad.net |
To post a comment you must log in.
Hello there!
The branch at hand introduces the association between package sets and
distro series as well as a new table ('packagesetgroup') that
facilitates the tracking of equivalent package sets across distro series
boundaries.
For more detail on these changes and why they are needed, please see:
* the original "package set and distro series" meeting minutes: pastebin. ubuntu. com/302054/ pastebin. ubuntu. com/302058/
http://
* Julian's update: http://
Please note also that the only change introduced to the underlying
trigger procedures was to make sure that when a package set P includes
another package set Q then both P and Q must belong to the same distro
series.
I have tested the schema patch at hand, particularly the data migration pastebin. ubuntu. com/302082 = some play data + plus the schema
part and the additional trigger procedure check using a SQL script
(http://
patch + plus the stricter trigger procedure) against the unpatched
database as follows:
{{{ patch.sql: 74: NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "packagesetgrou p_pkey" for table "packagesetgroup" patch.sql: 129: NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index "packageset_ _name__ distroseries_ _key" for table "packageset"
$ psql -d launchpad_dev -f /tmp/patch.sql
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
CREATE SEQUENCE
CREATE TABLE
ALTER SEQUENCE
psql:/tmp/
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
INSERT 0 5
UPDATE 5
UPDATE 3
ALTER TABLE
ALTER TABLE
UPDATE 5
UPDATE 4
ALTER TABLE
ALTER TABLE
psql:/tmp/
ALTER TABLE
UPDATE 4
INSERT 0 1
UPDATE 1
ALTER TABLE
ALTER TABLE
CREATE INDEX
CREATE INDEX
CREATE FUNCTION
$ psql -d launchpad_dev
Welcome to psql 8.3.8, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
------- ------- ------- ------- ------- ------- ------- ------- ------- ------- - ------- ------- ------- ------- ------- ------- ------- ------- ------- - ------- ---+--- ------- --+---- ------- --+---- -----
--
-- Please note below how the
-- * appropiate package set groups have been created
-- * equivalent package sets have been associated
--
-------
launchpad_dev=# SELECT ps.packagesetgroup, ps.id AS packageset, ps.name AS ps_name, ds.name AS ds_name FROM packageset ps, distroseries ds WHERE ps.distroseries = ds.id ORDER BY ps.packagesetgroup, ps.id;
packagesetgroup | packageset | ps_name | ds_name
-------
1 | 1 | umbrella | karmic
2 | 2 | deprecated | karmic
3 | 3 | mozilla | karmic
3 | 6 | mozilla | lucid
4 | 4 | firefox | karmic
4 | 7 | firefox | lucid
5 | 5 | thunderbird | karmic
5 | 8 | thunderbird | lucid
6 | 9 | only | lucid
(9 rows)
------- ------- ------- ------- ------- ------- ------- ------- ------- ------- -
--
-- Package sets belonging ...