Closed Mr0grog closed 1 year ago
I noticed schema.rb
doesn’t record anything about the sequences, and since this doesn't make things :bigserial
, was worried a fresh DB would potentially be missing the sequences.
Tried this and and it appears to create the sequences and hook them up to the PK columns correctly, though:
# NOTE: delete the old DB or change the DB name in database.yaml first!
rails db:create
rails db:schema:load
Integer primary keys can cause problems over time on big tables, and in general it's just better practice to use bigints instead. Some of our larger tables use UUIDs instead of ints, so this only upgrades the tables that used ints. (Practically speaking, none of these tables are really likely to overflow their primary key sequence, but better safe than sorry here, especially with technical maintainers offboarding.)
Fixes #1067.