lucky_migrator icon indicating copy to clipboard operation
lucky_migrator copied to clipboard

Make id an Int64 using bigserial

Open paulcsmith opened this issue 7 years ago • 2 comments

See #14

Will require changing LuckyRecord to use Int64 for the id. Right now it uses Int32. Please don't work on this until changes are made in LuckyRecord

paulcsmith avatar Nov 15 '17 15:11 paulcsmith

I just realized that I used an Int64 in the belongs_to method which breaks associations that use Int32 for ids.

https://github.com/luckyframework/lucky_migrator/blob/133d3320178e435bb942c5f7b34b3a2183840bc3/src/lucky_migrator/create_table_statement.cr#L111

I have no clue what I was thinking when doing that. Either I need to return this to Int32 or work on changing LuckyRecord to using Int64. What do you think I should do?

mikeeus avatar Dec 21 '17 10:12 mikeeus

Good catch! I think for now it would be best to change it to Int32 so it can be released without having to make changes to migratory and LuckyRecord

paulcsmith avatar Dec 21 '17 14:12 paulcsmith