mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1232: getAlterTableSQL is not supported by platform SQLite #1553
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
@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):
Issue was closed with resolution "Invalid"
@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 @beberlei:
In Sqlite you need to drop-database + create-database to get it working.
@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 (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 (Oct 22, 2012):
Comment created by hason:
Proposed solution http://www.doctrine-project.org/jira/browse/DBAL-370
@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 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 (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