mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 15:50:36 -05:00
- 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>
24 lines
1022 B
Ruby
24 lines
1022 B
Ruby
# Scanned logbook pages uploaded as a document, optionally transcribed into
|
|
# logbook entries by Claude (LogbookTranscriptionJob).
|
|
class CreateLogbookImports < ActiveRecord::Migration[8.1]
|
|
def change
|
|
create_table :logbook_imports do |t|
|
|
t.references :aircraft, null: false, foreign_key: true
|
|
t.references :user, foreign_key: { on_delete: :nullify }
|
|
t.references :document, foreign_key: { on_delete: :nullify }
|
|
t.string :status, null: false, default: "queued" # queued, running, done, failed
|
|
t.boolean :transcribe, null: false, default: true
|
|
t.string :log_type # force every entry to this log; nil = Claude decides
|
|
t.string :model
|
|
t.integer :pages_total, null: false, default: 0
|
|
t.integer :pages_done, null: false, default: 0
|
|
t.integer :entries_created, null: false, default: 0
|
|
t.json :warnings, null: false, default: []
|
|
t.text :error
|
|
t.datetime :started_at
|
|
t.datetime :finished_at
|
|
t.timestamps
|
|
end
|
|
end
|
|
end
|