Proposal to stick with int types instead of rails 5.1 bigint

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Proposal to stick with int types instead of rails 5.1 bigint

Evan Rolfe
Hi all, please see this PR for all the details:

https://github.com/openSUSE/open-build-service/pull/3809

tl;dr: Rails 5.1 changes primary keys from int to bigint by default. I
propose to stick with int since converting to bigint will take too much
time and effort.

I've also added a travis check which makes sure nobody adds a bigint
column to structure.sql by mistake.

--
Evan Rolfe
Full Stack Web Developer
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755;  https://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
Graham Norton, HRB 21284 (AG Nürnberg)

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Proposal to stick with int types instead of rails 5.1 bigint

Christian Bruckmayer-2
Evan, this looks good to me. On our reference server build.o.o we're not
nearly around 4 billion rows so we should be fine.

One idea what I had is to overwrite the rails migration generator,
however, not sure how much effort it would be and if it is worth.


On 09/12/2017 04:35 PM, Evan Rolfe wrote:

> Hi all, please see this PR for all the details:
>
> https://github.com/openSUSE/open-build-service/pull/3809
>
> tl;dr: Rails 5.1 changes primary keys from int to bigint by default. I
> propose to stick with int since converting to bigint will take too
> much time and effort.
>
> I've also added a travis check which makes sure nobody adds a bigint
> column to structure.sql by mistake.
>

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]