NZOI / nztrain

The NZOI online judge and training site written in Ruby
18 stars 13 forks source link

Commit updated db/schema.rb #225

Closed bagedevimo closed 9 months ago

bagedevimo commented 10 months ago

By updating the rails version, we now get a slightly different dump format. In practise, this is the same effective result, but we should commit this new version to: (a) ensure everyone is definitely loading the right thing when using schema:load (b) prevent diff's when doing a deploy which is just scary looking for now reason.

Holmes98 commented 9 months ago

We discussed this earlier but another option is to remove old migrations (I believe this means we'll no longer inherit changes to the rails defaults; not sure if we care). I think my preference is to either do that, or just manually remove the limits from the production DB.

bagedevimo commented 9 months ago

I'm in camp update the old migrations, because I don't like modifying the DB outside of migrations and a migration to remove the limits would be weird, if it didn't follow a migration that had the limits.

tom93 commented 9 months ago

How about inserting limit: 255 into the existing migrations (to retain previous behaviour), and also adding a new migration to remove the limit (I think by changing the column type)? Not sure if that's the best of both or the worst of both ;)

bagedevimo commented 9 months ago

Yeah I'll do that. I think it's best option for git history and non-using-psqls sake