SQL "Alter" not working
Hi
When trying to add a column with ALTER in the SQL tab the command which works well when used directly with the SQLite CLI tool, is not working. For example if I do ALTER TABLE albums ADD COLUMN test Integer on a table, output is just: ALTER TABLE albums ADD COLUMN test Integer ERROR:
Comments (8)
-
repo owner -
repo owner - changed component to ALTER TABLE
-
assigned issue to
- changed milestone to 1.9.8
-
repo owner - changed milestone to 1.9.9
-
repo owner Syntax ALTER TABLE ADD COLUMN is also supported since https://bitbucket.org/phpliteadmin/public/commits/e6b8e53719a3e5a440617c1f9e71c18b1855418d
-
repo owner https://bitbucket.org/phpliteadmin/public/commits/a4a268fb0d0a/
ALTER TABLE workaround is also triggered if the table name is not double-quoted, i.e. all other quotes work (single quotes, backticks, square brackets, no quotes).
-
repo owner - changed status to open
-
repo owner https://bitbucket.org/phpliteadmin/public/commits/313c73a598644b0ef4b7a2ebae1175302479f1a7 ALTER TABLE workaround now supports any kind of quoting around column and table names
-
repo owner - changed status to resolved
- Log in to comment
Hi,
The following Syntax works:
phpLiteAdmin currently is a little picky about the syntax of ALTER TABLE commands. This is because it does not simply pass them to SQLite, but parses them and creates workaround commands for ALTER TABLE commands that SQLite does not understand. For example, you can also execute
ALTER TABLE "testALTER" DROP "test"
in phpLiteAdmin, even though SQLite does not support DROP.But I agree that