← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~maxiberta/launchpad/db-named-auth-tokens into lp:launchpad/db-devel

 

Maximiliano Bertacchini has proposed merging lp:~maxiberta/launchpad/db-named-auth-tokens into lp:launchpad/db-devel.

Commit message:
Add ArchiveAuthToken.name; make ArchiveAuthToken.person nullable.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers): db

For more details, see:
https://code.launchpad.net/~maxiberta/launchpad/db-named-auth-tokens/+merge/299433

Add ArchiveAuthToken.name; make ArchiveAuthToken.person nullable. This is needed by the new named auth token API required for UA customer delivery of kernel livepatches. See https://code.launchpad.net/~maxiberta/launchpad/named-auth-tokens/+merge/299432.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~maxiberta/launchpad/db-named-auth-tokens into lp:launchpad/db-devel.
=== modified file 'database/schema/comments.sql'
--- database/schema/comments.sql	2016-01-26 15:47:37 +0000
+++ database/schema/comments.sql	2016-07-07 14:31:17 +0000
@@ -1952,6 +1952,7 @@
 COMMENT ON COLUMN ArchiveAuthToken.date_created IS 'The date and time this token was created.';
 COMMENT ON COLUMN ArchiveAuthToken.date_deactivated IS 'The date and time this token was deactivated.';
 COMMENT ON COLUMN ArchiveAuthToken.token IS 'The token text for this authorisation.';
+COMMENT ON COLUMN ArchiveAuthToken.name IS 'The name for this named token.';
 
 -- ArchiveDependency
 COMMENT ON TABLE ArchiveDependency IS 'This table maps a given archive to all other archives it should depend on.';

=== added file 'database/schema/patch-2209-79-0.sql'
--- database/schema/patch-2209-79-0.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2209-79-0.sql	2016-07-07 14:31:17 +0000
@@ -0,0 +1,12 @@
+-- Copyright 2016 Canonical Ltd.  This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+ALTER TABLE ArchiveAuthToken
+    ALTER COLUMN person DROP NOT NULL,
+    ADD COLUMN name text;
+
+CREATE INDEX archiveauthtoken__name__idx ON ArchiveAuthToken USING btree (name);
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 79, 0);


Follow ups