DDC-1232: getAlterTableSQL is not supported by platform SQLite #1553

Closed
opened 2026-01-22 13:17:48 +01:00 by admin · 10 comments
Owner

Originally created by @doctrinebot on GitHub (Jun 27, 2011).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user caefer:

updating leads to the following error

$ php app/console doctrine:schema:update

[Doctrine\DBAL\DBALException]
Operation 'Doctrine\DBAL\Platforms\AbstractPlatform::getAlterTableSQL' is not supported by platform.

Originally created by @doctrinebot on GitHub (Jun 27, 2011). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user caefer: updating leads to the following error $ php app/console doctrine:schema:update [Doctrine\DBAL\DBALException] Operation 'Doctrine\DBAL\Platforms\AbstractPlatform::getAlterTableSQL' is not supported by platform.
admin added the Bug label 2026-01-22 13:17:48 +01:00
admin closed this issue 2026-01-22 13:17:48 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jun 27, 2011):

Comment created by @beberlei:

Which is correct, because ALTER TABLE is not supported by SQLite.

@doctrinebot commented on GitHub (Jun 27, 2011): Comment created by @beberlei: Which is correct, because ALTER TABLE is not supported by SQLite.
Author
Owner

@doctrinebot commented on GitHub (Jun 27, 2011):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Jun 27, 2011): Issue was closed with resolution "Invalid"
Author
Owner

@doctrinebot commented on GitHub (Jun 27, 2011):

Comment created by caefer:

so a schema update can not be performed?
if so then there should be a more descriptive error message telling the user not to perform this task on sqlite databases.

@doctrinebot commented on GitHub (Jun 27, 2011): Comment created by caefer: so a schema update can not be performed? if so then there should be a more descriptive error message telling the user not to perform this task on sqlite databases.
Author
Owner

@doctrinebot commented on GitHub (Jun 27, 2011):

Comment created by @beberlei:

In Sqlite you need to drop-database + create-database to get it working.

@doctrinebot commented on GitHub (Jun 27, 2011): Comment created by @beberlei: In Sqlite you need to drop-database + create-database to get it working.
Author
Owner

@doctrinebot commented on GitHub (Aug 19, 2011):

Comment created by dosipov:

I get the same error while executing migrations:diff. Now, I use SQLite locally, but MySQL on production. Shouldn't migrations:diff create database agnostic migration, that I wouldn't be able to execute locally, but would work on production?

@doctrinebot commented on GitHub (Aug 19, 2011): Comment created by dosipov: I get the same error while executing migrations:diff. Now, I use SQLite locally, but MySQL on production. Shouldn't migrations:diff create database agnostic migration, that I wouldn't be able to execute locally, but would work on production?
Author
Owner

@doctrinebot commented on GitHub (Dec 13, 2011):

Comment created by yitznewton:

1 for making this abstract enough to handle a standard dev environment: getAlterTableSQL() should create and store an abstraction, and once that's done, either fail on attempted migration of actual SQLite database, or preferably issue warning & require --force or the like to do DROP CREATE

@doctrinebot commented on GitHub (Dec 13, 2011): Comment created by yitznewton: <ins>1 for making this abstract enough to handle a standard dev environment: getAlterTableSQL() should create and store an abstraction, and once that's done, either fail on attempted migration of actual SQLite database, or preferably issue warning & require --force or the like to do DROP </ins> CREATE
Author
Owner

@doctrinebot commented on GitHub (Oct 22, 2012):

Comment created by hason:

Proposed solution http://www.doctrine-project.org/jira/browse/DBAL-370

@doctrinebot commented on GitHub (Oct 22, 2012): Comment created by hason: Proposed solution http://www.doctrine-project.org/jira/browse/[DBAL-370](http://www.doctrine-project.org/jira/browse/DBAL-370)
Author
Owner

@doctrinebot commented on GitHub (Jan 2, 2013):

Comment created by @beberlei:

A related Github Pull-Request [GH-242] was opened
https://github.com/doctrine/dbal/pull/242

@doctrinebot commented on GitHub (Jan 2, 2013): Comment created by @beberlei: A related Github Pull-Request [GH-242] was opened https://github.com/doctrine/dbal/pull/242
Author
Owner

@doctrinebot commented on GitHub (Jan 7, 2013):

Comment created by @beberlei:

A related Github Pull-Request [GH-242] was closed
https://github.com/doctrine/dbal/pull/242

@doctrinebot commented on GitHub (Jan 7, 2013): Comment created by @beberlei: A related Github Pull-Request [GH-242] was closed https://github.com/doctrine/dbal/pull/242
Author
Owner

@doctrinebot commented on GitHub (Feb 1, 2013):

Comment created by galou:

SQLite supports a limited subset of ALTER TABLE. The ALTER TABLE command in SQLite allows the user to rename a table or to add a new column to an existing table. It is not possible to rename a column, remove a column, or add or remove constraints from a table.
http://www.sqlite.org/lang_altertable.html

@doctrinebot commented on GitHub (Feb 1, 2013): Comment created by galou: SQLite supports a limited subset of ALTER TABLE. The ALTER TABLE command in SQLite allows the user to rename a table or to add a new column to an existing table. It is not possible to rename a column, remove a column, or add or remove constraints from a table. http://www.sqlite.org/lang_altertable.html
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1553