Files
simple-aircraft-manager-rails/db/migrate/20261106180000_create_aircraft_imports.rb
T
rickyandClaude Opus 5.5 1c6c2f88c0 Blackstone oil analysis, .sam.zip export/import, AI logbook transcription
- Oil analysis: Blackstone PDF import (20 elements, oil properties, universal
  averages), results stored per element, oil type, "leave out of trends",
  the original app's statuses; AvLab fixes (multi-line comments, unrelated
  labels no longer steal values). Existing records migrate.
- Aircraft archives in the original app's .sam.zip format (schema v2): export
  from Access & Sharing, background import from the Fleet page, rake tasks.
  Archives move both ways between this app and the original.
- Scanned logbook pages (images or PDFs) upload as a document; with
  ANTHROPIC_API_KEY set, Claude transcribes them into logbook entries.
- Fix: deleting a component or aircraft failed when AD compliances or
  inspection records pointed at a component.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 21:05:19 -05:00

20 lines
809 B
Ruby

# One upload of an aircraft archive (.sam.zip) and the background job importing it.
class CreateAircraftImports < ActiveRecord::Migration[8.1]
def change
create_table :aircraft_imports do |t|
t.references :user, foreign_key: true
t.references :aircraft, foreign_key: { on_delete: :nullify }
t.string :status, null: false, default: "queued" # queued, running, done, failed
t.string :filename
t.string :tail_number # the tail the aircraft will be created with
t.string :source # where the archive came from (manifest source_instance)
t.json :counts, null: false, default: {}
t.json :warnings, null: false, default: []
t.text :error
t.datetime :started_at
t.datetime :finished_at
t.timestamps
end
end
end