Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to 2.1.1 with PostgreSQL broken #2442

Closed
foxmask opened this issue Oct 13, 2016 · 5 comments
Closed

upgrade to 2.1.1 with PostgreSQL broken #2442

foxmask opened this issue Oct 13, 2016 · 5 comments

Comments

@foxmask
Copy link
Contributor

foxmask commented Oct 13, 2016

Issue details

When upgrading, meet SQL error

Environment

  • wallabag version (or git revision) that exhibits the issue: 2.0.8
  • How did you install wallabag? Via git clone or by downloading the package? via http://doc.wallabag.org/en/master/user/upgrade-2.0.x-2.1.1.html
  • Last wallabag version that did not exhibit the issue (if applicable): 2.0.8
  • php version: 5.6
  • OS: debian 8.6
  • type of hosting (shared or dedicated): dedicated (vps)
  • which storage system you choose at install (SQLite, MySQL/MariaDB or PostgreSQL): PostgreSQL

Steps to reproduce/test case

I just simply try to update from 2.0.8 to 2.1.1 with PostgreSQL and the SQL instructions are absolutly not valid because "MySQL" oriented (due to backstick ` arround table / column) ie

21:26 $ php bin/console doctrine:migrations:migrate --env=prod

                    Application Migrations                    


WARNING! You are about to execute a database migration that could result in schema changes and data lost. Are you sure you wish to continue? (y/n)Y
Migrating up to 20160916201049 from 0

  ++ migrating 20160410190541

     -> ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NULL
Migration 20160410190541 failed during Execution. Error An exception occurred while executing 'ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NULL':

SQLSTATE[42601]: Syntax error: 7 ERREUR:  erreur de syntaxe sur ou près de « ` »
LINE 1: ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NUL...
                    ^


  [Doctrine\DBAL\Exception\SyntaxErrorException]                                                          
  An exception occurred while executing 'ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NULL':  
  SQLSTATE[42601]: Syntax error: 7 ERREUR:  erreur de syntaxe sur ou près de « ` »                        
  LINE 1: ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NUL...                                 
                      ^                                                                                   

  [Doctrine\DBAL\Driver\PDOException]                                               
  SQLSTATE[42601]: Syntax error: 7 ERREUR:  erreur de syntaxe sur ou près de « ` »  
  LINE 1: ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NUL...           
                      ^                                                             

  [PDOException]                                                                    
  SQLSTATE[42601]: Syntax error: 7 ERREUR:  erreur de syntaxe sur ou près de « ` »  
  LINE 1: ALTER TABLE `wallabag_entry` ADD `uuid` LONGTEXT DEFAULT NUL...           
                      ^                                                             

Also LONGTEXT is not applicable for PostgreSQL :/

@tcitworld
Copy link
Member

Duplicate from #2364 ?

@foxmask
Copy link
Contributor Author

foxmask commented Oct 13, 2016

ah yes, I missed it .

@foxmask foxmask closed this as completed Oct 13, 2016
@nicosomb
Copy link
Member

Can you confirm that the fix made by @j0k3r is OK for you?

@foxmask
Copy link
Contributor Author

foxmask commented Oct 14, 2016

I was going to #2364 and run the sql (shown of the upgrade page) by hand but didnt see his fix there

@tcitworld
Copy link
Member

See #2412

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants