From patchwork Fri Jun 30 16:25:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 9820085 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7F124603F2 for ; Fri, 30 Jun 2017 16:28:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2C25286A2 for ; Fri, 30 Jun 2017 16:28:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7532286B4; Fri, 30 Jun 2017 16:28:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6F45C286A2 for ; Fri, 30 Jun 2017 16:28:20 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQyjd-0005jG-Ml; Fri, 30 Jun 2017 16:25:33 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQyjc-0005iR-Ly for xen-devel@lists.xenproject.org; Fri, 30 Jun 2017 16:25:32 +0000 Received: from [85.158.143.35] by server-4.bemta-6.messagelabs.com id 68/73-02962-C7B76595; Fri, 30 Jun 2017 16:25:32 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjkeJIrShJLcpLzFFi42JxWrohUre6Oiz S4OleDYvvWyYzOTB6HP5whSWAMYo1My8pvyKBNeNV90vGglNcFRP+LWVsYPzA0cXIySEh4C+x 4OR3dhCbTUBXomnLX7YuRg4OEQEVidt7DUDCzAILGCUefi8BsYUFgiV+TVzJBGKzCKhKfH2+i x2knFfAU+LYomqIiXIS54//ZAaxOQW8JB5OWwQ2XQio5MW5CSwg5UICahJz18eDhHkFBCVOzn zCArFJQuLgixfMExh5ZyFJzUKSWsDItIpRozi1qCy1SNfYWC+pKDM9oyQ3MTNH19DATC83tbg 4MT01JzGpWC85P3cTIzBsGIBgB+PO9YGHGCU5mJREeVdeC40U4kvKT6nMSCzOiC8qzUktPsQo w8GhJMFrXRUWKSRYlJqeWpGWmQMMYJi0BAePkgivbBBQmre4IDG3ODMdInWKUZfj1YT/35iEW PLy81KlxHl5QGYIgBRllObBjYBF0yVGWSlhXkago4R4ClKLcjNLUOVfMYpzMCoJ8wqBTOHJzC uB2/QK6AgmoCOEZ4SAHFGSiJCSamB05PiXkzzZ4toN5Q0HhFa185qpLBVokfUV/7HZ76H1lK2 z1WzKrwX2iCh8V3i4XkLmedeumCyTri+ifyat27nb67fL5ooFl2KyDp1cb780c8myHb8OV/Ud tF4xYX+n1vM7xsw6923eGUicTr5xQU+i4VrPNMOTotPPuOstXvLPUjbYUa8jo/aFEktxRqKhF nNRcSIAgfSEcqECAAA= X-Env-Sender: prvs=3471c4a24=Ian.Jackson@citrix.com X-Msg-Ref: server-2.tower-21.messagelabs.com!1498839926!57213481!2 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 39363 invoked from network); 30 Jun 2017 16:25:31 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-2.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 30 Jun 2017 16:25:31 -0000 X-IronPort-AV: E=Sophos;i="5.40,287,1496102400"; d="scan'208";a="430028784" From: Ian Jackson To: Date: Fri, 30 Jun 2017 17:25:06 +0100 Message-ID: <1498839920-17025-4-git-send-email-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1498839920-17025-1-git-send-email-ian.jackson@eu.citrix.com> References: <1498839920-17025-1-git-send-email-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Cc: Andrew Cooper , Wei Liu , Ian Jackson Subject: [Xen-devel] [OSSTEST PATCH 03/17] schema updates: Document how to remove a used column X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ian Jackson --- schema/README.updates | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/schema/README.updates b/schema/README.updates index c5abc36..ca1d37e 100644 --- a/schema/README.updates +++ b/schema/README.updates @@ -147,6 +147,32 @@ finish is needed', this will usually involve passing an appropriate `-o' option. +Update order for Cleanup +------------------------ + +This is for when we want to get rid of some old information in the +database. Sometimes the information will have been replaced eg via +a Populate-then-Rely change, as described above. + +There are typically two schema changes: + +* To allow the new information to be left blank (eg for the column to + be NULL). Call this `unconstrain'; it is an `Explicit conditional' + change. + +* To drop the information entirely. I will call this `drop'. + It is `Code first'. + +1. Commit: new schema updates `unconstrain', status `Unfinished' + and `drop', status `Unfinished'. + +2. Commit code which tolerates the information being missing; + changing `unconstrain' to Ready. + +3. Commit code which no longer writes the information; changing + `unconstrain' to Needed and `drop' to Ready. + + Statuses and rules for push and db update -----------------------------------------