36.9. Deleting Tables and Databases

This module also contains buttons for deleting a table from a database, or an entire database and everything in it. When a table is removed, all records and fields that it contains will be lost.

To remove a table, follow these steps:

1.
On the module's main page, click on the icon for the database from which you want to remove the table, and then on the icon for the table itself.

2.
Click on the Drop Table button below the list of fields. This will take you to a confirmation page that asks if you are sure and tells you how many records will be deleted.

3.
To go ahead, click the Drop Table button again. Once it has been removed, you will return to the list of surviving tables in the database.

It is also possible to delete an entire database and all the tables and records in it. Any database can be removed, but deleting template1 is a bad idea as the module connects to it when retrieving the list of other databases and assumes that it will always exist. As usual, unless you have made a backup, there is no way to undo the deletion.

Assuming you really want to delete a database, follow these steps:

1.
On the main page, click on the icon for the database that you want to remove.

2.
Hit the Drop Database button below the list of tables. A confirmation page will be displayed, telling you how many tables and records will be lost if you go ahead.

3.
To continue with the deletion, click the Drop Database button and you will return to the module's main page when it is done.

It is possible to remove the template1 database if you change the Initial PostgreSQL database field on the module configuration to some other database that is not going to be removed.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.111.129