hensei-api/db/migrate/20251223000000_add_orphaned_to_grid_items.rb
Justin Edmund a6b7e26210
collection sync with orphan handling (#200)
- preview_sync endpoint shows what'll get deleted before you commit
- import services handle reconciliation (find missing items, delete them)
- grid items get flagged as orphaned when their collection source is gone
- party exposes has_orphaned_items
- blueprints include orphaned field
2025-12-23 22:44:35 -08:00

13 lines
473 B
Ruby

# frozen_string_literal: true
class AddOrphanedToGridItems < ActiveRecord::Migration[8.0]
def change
add_column :grid_weapons, :orphaned, :boolean, default: false, null: false
add_column :grid_summons, :orphaned, :boolean, default: false, null: false
add_column :grid_artifacts, :orphaned, :boolean, default: false, null: false
add_index :grid_weapons, :orphaned
add_index :grid_summons, :orphaned
add_index :grid_artifacts, :orphaned
end
end