Move Sqlite to mysql and changes in behaviour