Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Platforms, Schema Managers
-
Security Level: All
-
Labels:None
Description
A table in this application had no primary keys. I created an entity
so i could attempt to use the doctrine:schema:update command to fix it up.
When i attempted to add this:
- @ORM\Id
- @ORM\GeneratedValue(strategy="NONE")
to this:
- @ORM\Column(name="session_id", type="string", length=128,
nullable=false)
it generates SQL like this:
ALTER TABLE whos_online DROP INDEX idx_session_id_zen, ADD UNIQUE INDEX primary (session_id);
ALTER TABLE whos_online CHANGE ip_address ip_address VARCHAR(45) NOT NULL, CHANGE host_address host_address VARCHAR(512) NOT NULL;
and says this:
An exception occurred while executing 'ALTER TABLE whos_online DROP INDEX idx_session_id_zen, ADD UNIQUE INDEX primary (session_id );
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'primary (session_id)' at line 1
Activity
| Field | Original Value | New Value |
|---|---|---|
| Description |
A table in this application had no primary keys. I created an entity
so i could attempt to use the doctrine:schema:update command to fix it up. When i attempted to add this: * @ORM\Id * @ORM\GeneratedValue(strategy="NONE") to this: * @ORM\Column(name="session_id", type="string", length=128, nullable=false) it generates SQL like this: ALTER TABLE whos_online DROP INDEX idx_session_id_zen, ADD UNIQUE INDEX primary (session_id); ALTER TABLE whos_online CHANGE ip_address ip_address VARCHAR(45) NOT NULL, CHANGE host_address host_address VARCHAR(512) NOT NULL; and says this: {quote} An exception occurred while executing 'ALTER TABLE whos_online DROP INDEX idx_session_id_zen, ADD UNIQUE INDEX primary (session_id ); SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'primary (session_id)' at line 1 {quote} |
| Description |
A table in this application had no primary keys. I created an entity
so i could attempt to use the doctrine:schema:update command to fix it up. When i attempted to add this: * @ORM\Id * @ORM\GeneratedValue(strategy="NONE") to this: * @ORM\Column(name="session_id", type="string", length=128, nullable=false) it generates SQL like this: ALTER TABLE whos_online DROP INDEX idx_session_id_zen, ADD UNIQUE INDEX primary (session_id); ALTER TABLE whos_online CHANGE ip_address ip_address VARCHAR(45) NOT NULL, CHANGE host_address host_address VARCHAR(512) NOT NULL; and says this: {quote} An exception occurred while executing 'ALTER TABLE whos_online DROP INDEX idx_session_id_zen, ADD UNIQUE INDEX primary (session_id ); SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'primary (session_id)' at line 1 {quote} |
A table in this application had no primary keys. I created an entity
so i could attempt to use the doctrine:schema:update command to fix it up. When i attempted to add this: * @ORM\Id * @ORM\GeneratedValue(strategy="NONE") to this: * @ORM\Column(name="session_id", type="string", length=128, nullable=false) it generates SQL like this: {quote} ALTER TABLE whos_online DROP INDEX idx_session_id_zen, ADD UNIQUE INDEX primary (session_id); ALTER TABLE whos_online CHANGE ip_address ip_address VARCHAR(45) NOT NULL, CHANGE host_address host_address VARCHAR(512) NOT NULL; {quote} and says this: {quote} An exception occurred while executing 'ALTER TABLE whos_online DROP INDEX idx_session_id_zen, ADD UNIQUE INDEX primary (session_id ); SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'primary (session_id)' at line 1 {quote} |
- Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DBAL-400, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)