stevukas / phpliteadmin

Automatically exported from code.google.com/p/phpliteadmin
0 stars 0 forks source link

ALTER TABLE creates column with empty name, not possible to edit or delete it #266

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system? Which
Database Extension (PDO/SQLiteDatabase/SQLiteDatabase3 - see Database
structure-tab in phpLiteAdmin)?

Please provide any additional information below.
Am using php app on ipad using sqlite admin. I ran sql query ALTER to add a 
field to end of existing table. Must have got the format of the field name 
wrong ( I enclosed it in double quotes ie "fieldname". It created the field but 
it had no name. When I go into admin and press delete it won't let me. Neither 
will it let me rename the field.

Original issue reported on code.google.com by Barr...@gmail.com on 26 Mar 2015 at 12:33

GoogleCodeExporter commented 9 years ago
Could you please provide the CREATE TABLE statement of the table?
To get it, open the table in phpLiteAdmin, click "Strcuture" tab and see "Query 
used to create this table".

Original comment by crazy4ch...@gmail.com on 26 Mar 2015 at 1:19

GoogleCodeExporter commented 9 years ago
Okay, I was able to reproduce it.
I entered this in the SQL tab:
ALTER TABLE "t" ADD "test" INTEGER 
And it produced:
CREATE TABLE 't' ('aD' INTEGER, 'sae' INTEGER, '' INTEGER , PRIMARY KEY ("sae") 
)
Which was before:
CREATE TABLE 't' ('aD' INTEGER, 'sae' INTEGER, PRIMARY KEY ("sae") )

But I was able to delete this column....

Original comment by crazy4ch...@gmail.com on 26 Mar 2015 at 1:32

GoogleCodeExporter commented 9 years ago
The current version from git is able to drop empty columns. Not to rename, but 
this is not easy to solve and I consider this unnecessary.

I fixed the problems that lead to the creation of the column with the empty 
name. You can find the current development version attached.

So I consider this fixed.

Original comment by crazy4ch...@gmail.com on 26 Mar 2015 at 3:49

Attachments: