ualbertalib / avalon

University of Alberta's Media Repository based on Avalon
Apache License 2.0
2 stars 2 forks source link

ERA A+V upgrade to Avalon 6.5.0 - step 5 of 6: autogenerated IDs #627

Closed jefferya closed 4 years ago

jefferya commented 4 years ago

Step 5 of the ERA A+V Avalon update to 6.5.0. Meant to be combined with several other steps to produce a working ERA A+V

Convert autogenerated ids from Rails 4 to Rails 5.1 bigint

The two contexts:

In Avalon 6.5, a DB migration adds a new table with foreign key (type specified) referencing the users table thus the db migration successfully creates the table in the first context (preexisting DB) and errors on the second case (DB creation) due to a type mismatch. https://github.com/jefferya/avalon/blob/f55d4a16b4ce6efb4ee3568b7ac54134ab62851d/db/migrate/20190212211753_create_timelines.rb#L5

Create a migration for the existing 5.4.3 deployment that changes all of the ID columns (and all of the columns that reference those ID columns

The rationale for going this route is that the orm generator API may not last forever, so dealing with the change now is probably more future proof

update database migration to include playlist clip_id

include schema.rb after converting autogenerated ids