]> git.openstreetmap.org Git - rails.git/commit
Migrate some sequences to use bigints
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 6 Dec 2023 14:42:40 +0000 (14:42 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 6 Dec 2023 14:54:12 +0000 (14:54 +0000)
commit367fa44a74c06563b6f0e23c1e9db888769f57f0
tree66635d4bd68de33b062ec61bdcb2581f9fa2b0a4
parent0c2e471708911235ded4015dfe9e957e9f1430f0
Migrate some sequences to use bigints

These primary keys were converted to bigints in migrations, but the
sequences were left unmentioned. If the original migrations are run on
postgresql 10.0+, then this leads to a mismatch in column types vs sequence
types. This migration fixes these mismatches.

If the original migrations were run on postgresql < 10, all sequences were
bigints anyway, and this migration is a no-op.

If the sequence is a bigint, then postgresql doesn't output that fact in the
statement dump.

Refs #4298
db/migrate/20231206141457_alter_sequences_bigint.rb [new file with mode: 0644]
db/structure.sql