pulibrary / bibdata

Local API for retrieving bibliographic and other useful data from Alma (Ruby 3.1.0, Rails 7.1.3.4)
BSD 2-Clause "Simplified" License
16 stars 7 forks source link

Use enum for DumpType #2357

Closed maxkadel closed 3 months ago

maxkadel commented 3 months ago

We have seen many issues with the postgres database queries around DumpTypes, so trying putting them into an enum. The number in the database table should be the same whether it's a dump_type_id or the enum.

Enums come with some nice stuff for free, like scopes and booleans (e.g. dump.changed_records?).

Closes #2348