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

Update model annotations to use BIGINT for IDs #5461

Merged
merged 1 commit into from
Nov 12, 2017

Conversation

danhunsaker
Copy link
Contributor

All the migrations have been updated to use BIGINTs for ID fields in the DB, but ActiveRecord needs to be told to treat those values as BIGINT as well. This PR does that.

@danhunsaker danhunsaker force-pushed the bugfix/bigint-in-activemodels branch 5 times, most recently from 02cf422 to be2915b Compare October 27, 2017 18:59
@danhunsaker danhunsaker force-pushed the bugfix/bigint-in-activemodels branch 2 times, most recently from df91a8f to 8b1a2fc Compare November 4, 2017 02:41
@danhunsaker danhunsaker force-pushed the bugfix/bigint-in-activemodels branch 5 times, most recently from 71325e4 to 8b69df8 Compare November 12, 2017 04:16
@danhunsaker
Copy link
Contributor Author

Just a quick bump to get some feedback, at least.

All the migrations have been updated to use BIGINTs for ID fields in the DB, but ActiveRecord needs to be told to treat those values as BIGINT as well. This PR does that.
@Gargron Gargron merged commit cf7e840 into mastodon:master Nov 12, 2017
@danhunsaker danhunsaker deleted the bugfix/bigint-in-activemodels branch November 12, 2017 20:22
@Gargron
Copy link
Member

Gargron commented Nov 15, 2017

Unfortunately, since this is auto-generated, this will all get overwritten the next time we run db:migrate

@danhunsaker
Copy link
Contributor Author

That shouldn't be an issue, since the autogenerated annotations should then correctly be bigint instead of integer?

@Gargron
Copy link
Member

Gargron commented Nov 15, 2017

@danhunsaker Well, for whatever reason, the annotate gem picks them up as integer and not bigint. Otherwise this PR wouldn't have had anything to correct either.

@danhunsaker
Copy link
Contributor Author

I was a little confused about why the annotations hadn't been updated already in that case.

So we're looking at a bug in the annotations gem, then?

@ykzts
Copy link
Sponsor Member

ykzts commented Nov 15, 2017

It is fixed by ctran/annotate_models#515 . But it has not been released yet.

@nightpool nightpool mentioned this pull request Nov 17, 2017
4 tasks
cobodo pushed a commit to cobodo/mastodon that referenced this pull request Dec 6, 2017
All the migrations have been updated to use BIGINTs for ID fields in the DB, but ActiveRecord needs to be told to treat those values as BIGINT as well. This PR does that.
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

Successfully merging this pull request may close these issues.

None yet

3 participants