No column and table deletion in database
HI.
I am having trouble in deleting a table’s column and even table itself since yesterday..I am unable to proceed..Please help with that asap.. Thanks
Comments (6)
-
repo owner -
repo owner - removed milestone
-
reporter This is the error message
and this is the table i am trying to delete the column with name “apartment” . This table has no foreign key itself from another table but yes its field ID is used by other tables. So i am not deleting this table residents but just a field named “apartment”
CREATE TABLE 'residents' ( 'id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,'username' text NOT NULL ,'hash' TEXT NOT NULL,'apartment' INTEGER NOT NULL )
-
repo owner Can you please enable debug mode (set
$debug = true;
in your phpliteadmin.config.php or phpliteadmin.php) , try again and post the full output? -
repo owner And your screenshot indicates that you are using 1.9.7.1. Can you please try 1.9.8.2? We fixed a couple of issues regarding altering tables.
-
repo owner - changed status to invalid
Closed due to missing feedback. Most probably this issue is already fixed in the current version.
- Log in to comment
Please provide more information, like
Most likely, you cannot delete the column or table because you defined a foreign key constraint form another table to this column. For example, if you have a salary table and an employee table and in the salary table, the employee column is a reference to the id column in the employee table, you cannot delete the id column of the employee table. To solve this, you could remove the foreign key constraint. Afterwards, you can delete the column/table. You may get broken references of course. In the example, you would have salaries that don’t refer to any employee anymore.