Fixed #23947 -- Django's test suite doesn't pass in reverse order with PostgreSQL

Some suggestions to fix the problem when running Django's test suite using PostgreSQL database. With these changes, tests using Sqlite and PostgreSQL are running ok in both reverse and normal order.
We could probably update this entire method to use values from the `SchemaEditor` (like `sql_delete_table` in this case) to improve this test.