Skip to content

Erreur durant l'installation avec une base Postgresql #27

@shang001

Description

@shang001

Bonjour,

En tentant d'installer rdvz avec le script install sur une base Postgresql, voilà le message d'erreur que j'ai:

>> doctrine  Migrating from version 0 to 7

  The following errors occurred:                                                                                                                                                                                                                                                                                                                                                                                       

   - SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "user"
LINE 1: CREATE TABLE user (id BIGSERIAL, ldap_id VARCHAR(50) UNIQUE,...
                     ^. Failing Query: "CREATE TABLE user (id BIGSERIAL, ldap_id VARCHAR(50) UNIQUE, login VARCHAR(50) UNIQUE, pass VARCHAR(40), name VARCHAR(255), surname VARCHAR(255), mail VARCHAR(255), language VARCHAR(8) DEFAULT 'fr', PRIMARY KEY(id))"  
   - SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "user"
LINE 1: ... meeting_uid_user_id FOREIGN KEY (uid) REFERENCES user(id) O...
                                                             ^. Failing Query: "ALTER TABLE meeting ADD CONSTRAINT meeting_uid_user_id FOREIGN KEY (uid) REFERENCES user(id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE"                             
   - SQLSTATE[25P02]: In failed sql transaction: 7 ERROR:  current transaction is aborted, commands ignored until end of transaction block. Failing Query: "ALTER TABLE meeting_date ADD CONSTRAINT meeting_date_mid_meeting_id FOREIGN KEY (mid) REFERENCES meeting(id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE"                                                                                         
   - SQLSTATE[25P02]: In failed sql transaction: 7 ERROR:  current transaction is aborted, commands ignored until end of transaction block. Failing Query: "ALTER TABLE meeting_poll ADD CONSTRAINT meeting_poll_date_id_meeting_date_id FOREIGN KEY (date_id) REFERENCES meeting_date(id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE"                                                                       
   - SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "user"
LINE 1: ...ing_poll_uid_user_id FOREIGN KEY (uid) REFERENCES user(id) O...
                                                             ^. Failing Query: "ALTER TABLE meeting_poll ADD CONSTRAINT meeting_poll_uid_user_id FOREIGN KEY (uid) REFERENCES user(id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE"                   
   - SQLSTATE[25P02]: In failed sql transaction: 7 ERROR:  current transaction is aborted, commands ignored until end of transaction block. Failing Query: "CREATE TABLE is_following (id BIGSERIAL, mid BIGINT, uid BIGINT, PRIMARY KEY(id))"                                                                                                                                                                         
   - SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "ON"
LINE 1: ...REIGN KEY (mid) REFERENCES meeting(id) ON UPDATE  ON DELETE ...
                                                             ^. Failing Query: "ALTER TABLE is_following ADD CONSTRAINT is_following_mid_meeting_id FOREIGN KEY (mid) REFERENCES meeting(id) ON UPDATE  ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE"    
   - SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "user"
LINE 1: ...ollowing_uid_user_id FOREIGN KEY (uid) REFERENCES user(id) O...
                                                             ^. Failing Query: "ALTER TABLE is_following ADD CONSTRAINT is_following_uid_user_id FOREIGN KEY (uid) REFERENCES user(id) ON UPDATE  ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE"        
   - SQLSTATE[25P02]: In failed sql transaction: 7 ERROR:  current transaction is aborted, commands ignored until end of transaction block. Failing Query: "CREATE INDEX is_following_mid ON is_following (mid)"                                                                                                                                                                                                       
   - SQLSTATE[25P02]: In failed sql transaction: 7 ERROR:  current transaction is aborted, commands ignored until end of transaction block. Failing Query: "CREATE INDEX is_following_uid ON is_following (uid)"                                                                                                                                                                                                       

[OK]
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0

Je pense que le problème réside dans la syntaxe de la création de table pour la premiere ligne: voici ce que j'ai utilisé à la place:

CREATE TABLE "user"
(id serial, 
ldap_id character varying(50), 
login character varying(50), 
pass character varying(40), 
name character varying(255), 
surname character varying(255), 
mail character varying(255), 
language character varying(8) DEFAULT 'fr', 
CONSTRAINT user_pkey PRIMARY KEY(id));

Par contre, pour la deuxième ligne, il y a un ALTER TABLE d'une table inexistante, donc j'ai dû m'arrêter là.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions