Much base work started
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled

This commit is contained in:
Dan Milne
2025-10-31 14:36:14 +11:00
parent 4a35bf6758
commit 88a906064f
97 changed files with 5333 additions and 2774 deletions

View File

@@ -0,0 +1,16 @@
class UpdateExternalIdsFromArchitecture < ActiveRecord::Migration[8.1]
def change
change_table :external_ids do |t|
# Make source and value required
t.change_null :source, false
t.change_null :value, false
end
# Add indexes as specified in architecture
# Ensure each source only appears once per work
add_index :external_ids, [:work_id, :source], unique: true
# Fast lookup by external ID (for "find work by IMDB ID" queries)
add_index :external_ids, [:source, :value], unique: true
end
end