BeWelcome / rox

:earth_africa: BeWelcome lets you share a place to stay, connect with travellers, meet up and find accommodation on your journey. It is and will always be a free, open source, non for profit, democratic community.
https://www.bewelcome.org
GNU General Public License v2.0
188 stars 54 forks source link

Cannot docker-compose up anymore #311

Closed zeuros closed 1 year ago

zeuros commented 1 year ago

@thisismeonmounteverest Commit e14099bb2d17ae46d69902b32a1430eb1c3aada1 brought a regression (I guess), Below is the trace of docker-compose up. The rememberme_token table is created by a migration but it already exists for some reason (I resetted the DB before)

php_1     |   ++ migrating 20200922180300 (Add rememberme_token table)
php_1     | 
php_1     |      -> 
php_1     |             CREATE TABLE `rememberme_token` (
php_1     |                 `series`   char(88)     UNIQUE PRIMARY KEY NOT NULL,
php_1     |                 `value`    varchar(88)  NOT NULL,
php_1     |                 `lastUsed` datetime     NOT NULL,
php_1     |                 `class`    varchar(100) NOT NULL,
php_1     |                 `username` varchar(200) NOT NULL
php_1     |             );
php_1     | Migration 20200922180300 failed during Execution. Error An exception occurred while executing '
php_1     |             CREATE TABLE `rememberme_token` (
php_1     |                 `series`   char(88)     UNIQUE PRIMARY KEY NOT NULL,
php_1     |                 `value`    varchar(88)  NOT NULL,
php_1     |                 `lastUsed` datetime     NOT NULL,
php_1     |                 `class`    varchar(100) NOT NULL,
php_1     |                 `username` varchar(200) NOT NULL
php_1     |             );
php_1     |         ':
php_1     | 
php_1     | SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'rememberme_token' already exists
php_1     | 
php_1     | In AbstractMySQLDriver.php line 57:
php_1     |                                                                                
php_1     |   An exception occurred while executing '                                      
php_1     |               CREATE TABLE `rememberme_token` (                                
php_1     |                   `series`   char(88)     UNIQUE PRIMARY KEY NOT NULL,         
php_1     |                   `value`    varchar(88)  NOT NULL,                            
php_1     |                   `lastUsed` datetime     NOT NULL,                            
php_1     |                   `class`    varchar(100) NOT NULL,                            
php_1     |                   `username` varchar(200) NOT NULL                             
php_1     |               );                                                               
php_1     |           ':                                                                   
php_1     |                                                                                
php_1     |   SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'rememberme_  
php_1     |   token' already exists                                                        
php_1     |                                                                                
php_1     | 
php_1     | In Exception.php line 18:
php_1     |                                                                                
php_1     |   SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'rememberme_  
php_1     |   token' already exists                                                        
php_1     |                                                                                
php_1     | 
php_1     | In PDOConnection.php line 141:
php_1     |                                                                                
php_1     |   SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'rememberme_  
php_1     |   token' already exists                                                        
php_1     |                                                                                
php_1     | 
php_1     | test:database:create [--force] [--drop] [--translations]
php_1     | 
rox_php_1 exited with code 1
thisismeonmounteverest commented 1 year ago

Updating to the new authentication system had a side effect (see https://symfony.com/doc/current/security/remember_me.html#storing-remember-me-tokens-in-the-database); so the migration is no longer needed.