scragg0x / realms-wiki

Git based wiki inspired by Gollum
http://realms.io
GNU General Public License v2.0
833 stars 91 forks source link

going from 0.7.0 to 0.8.0 break postgres #166

Open glassresistor opened 7 years ago

glassresistor commented 7 years ago

I've been working on this project for a while and pulled in your recent changes and it broke my build. I also checked out a fresh install of version 0.8.0 and it also fails when connecting to Postgres with this error.

I've been hoping to merge back in many of my changes but if it is still broken I'm likely to start just maintaining a widely divergent fork.

sqlalchemy.exc.DataError

DataError: (psycopg2.DataError) value "103194032201089298443" is out of range for type integer
LINE 3: WHERE users.id = '103194032201089298443' 
                         ^
 [SQL: 'SELECT users.id AS users_id, users.username AS users_username, users.email AS users_email, users.password AS users_password \nFROM users \nWHERE users.id = %(id_1)s \n LIMIT %(param_1)s'] [parameters: {'id_1': '103194032201089298443', 'param_1': 1}]
scragg0x commented 7 years ago

If you change the user model to use BigInteger for the id and manually alter the table you might be ok. How come the user id is so large? Is is expected to be an integer or string?