Verified Commit 17a6687e authored by anarcat's avatar anarcat
Browse files

lists: fix mdl warnings

I *think* the problem was the lists weren't indented, but whatever,
this works.
parent 42cb244f
Loading
Loading
Loading
Loading
+130 −128
Original line number Original line Diff line number Diff line
@@ -259,10 +259,11 @@ database directly, as mailman doesn't offer any similar compliance mechanism.
In this example, we'll pretend to handle a request to redact the name "Foo Bar"
In this example, we'll pretend to handle a request to redact the name "Foo Bar"
and an associated email address, "foo@bar.com":
and an associated email address, "foo@bar.com":


0. login to `lists-01`, run `sudo -u postgres psql` and `\c mailman3`
 0. Login to `lists-01`, run `sudo -u postgres psql` and `\c mailman3`


1. backup the affected database rows to temporary tables:
 1. Backup the affected database rows to temporary tables:


```
CREATE TEMP TABLE hyperkitty_attachment_redact AS
CREATE TEMP TABLE hyperkitty_attachment_redact AS
SELECT * FROM hyperkitty_attachment
SELECT * FROM hyperkitty_attachment
    WHERE
    WHERE
@@ -289,8 +290,9 @@ and an associated email address, "foo@bar.com":
CREATE TEMP TABLE user_redact AS
CREATE TEMP TABLE user_redact AS
      SELECT * from "user"
      SELECT * from "user"
  WHERE display_name = 'Foo Bar';
  WHERE display_name = 'Foo Bar';
```


2. begin the transaction
 2. Run the actual modifications inside a transaction:


    	BEGIN;
    	BEGIN;
    
    
@@ -381,13 +383,13 @@ and an associated email address, "foo@bar.com":
            SET display_name = '[REDACTED]'
            SET display_name = '[REDACTED]'
            WHERE display_name = 'Foo Bar';
            WHERE display_name = 'Foo Bar';


3. look around the modified tables, do `COMMIT;` if all good, otherwise `ROLLBACK;`
 3. Look around the modified tables, do `COMMIT;` if all good, otherwise `ROLLBACK;`
 
 
4. ending the `psql` session discards the temporary tables, so keep it open
 4. Ending the `psql` session discards the temporary tables, so keep it open
 
 
5. look at the archives if everything is ok
 5. Look at the archives if everything is ok
 
 
6. end the `psql` session
 6. End the `psql` session


To rollback changes after the transaction has been committed to the database,
To rollback changes after the transaction has been committed to the database,
using the temporary tables:
using the temporary tables: