radar/twist-v2

View on GitHub
backend/db/migrate/20200307094440_nullify_footnote_chapter_id.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

ROM::SQL.migration do
  change do
    alter_table :footnotes do
      drop_foreign_key :chapter_id
      add_foreign_key :chapter_id, :chapters, on_delete: :set_null, null: true
    end
  end
end