]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
schema updates: Document how to remove a used column
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 29 Jun 2017 15:44:11 +0000 (16:44 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 29 Jun 2017 16:41:58 +0000 (17:41 +0100)
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
schema/README.updates

index c5abc365503f97c9a911fa928b5606e9261e86f5..ca1d37e703ed7b3c81b518721f6dde0cd7022190 100644 (file)
@@ -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
 -----------------------------------------