src-d / ghsync

GitHub API v3 > PostgreSQL
https://sourced.tech
GNU General Public License v3.0
9 stars 8 forks source link

Remove pointer primary keys #29

Closed carlosms closed 5 years ago

carlosms commented 5 years ago

Fix #21.

The changes in the kallax fork we are using made possible to use *int64 as primary key, but it's not fully implemented and it panicked when trying to read the value from the DB.

In this PR I've replaced all the *int64 primary keys with an extra column that contains the same value. I think this is safe and should not affect any of the existing chart queries, because the original id column still exists. It's just that kallax_id is the primary key now, with the same value as id.

I didn't create an incremental migration file because kallax complained with A manual change is required: don't know how to generate migration for a change of type in issues(id).. Since we don't have any release, I just overwrote the initial migration.

smacker commented 5 years ago

approved but travis is failing

carlosms commented 5 years ago

Travis fixed, the default file permissions are different and it was creating a different bindata.go file.