Alchemist docs
Alchemist documentation

Find a page.

Type at least two characters.

    Docs menu

    Reference

    Database Schema

    SQLite schema reference and migration policy.

    Source revision aeebc48

    Database location:

    • Linux/macOS: ~/.config/alchemist/alchemist.db
    • Linux/macOS with XDG: $XDG_CONFIG_HOME/alchemist/alchemist.db
    • Windows: %APPDATA%\Alchemist\alchemist.db
    • Override: ALCHEMIST_DB_PATH

    jobs

    ColumnTypeDescription
    idINTEGERPrimary key
    input_pathTEXTUnique source path
    output_pathTEXTPlanned output path
    statusTEXTCurrent job state
    mtime_hashTEXTFile modification fingerprint
    priorityINTEGERQueue priority
    progressREALProgress percentage
    attempt_countINTEGERRetry count
    created_atDATETIMECreation timestamp
    updated_atDATETIMELast update timestamp
    archivedBOOLEANArchived flag for cleared completed jobs
    health_issuesTEXTSerialized health issues from Library Doctor
    last_health_checkTEXTLast library health check timestamp
    input_metadata_jsonTEXTSerialized input probe metadata captured at enqueue time so completed jobs do not require live re-probing

    encode_stats

    ColumnTypeDescription
    idINTEGERPrimary key
    job_idINTEGERUnique foreign key to jobs.id
    input_size_bytesINTEGEROriginal size
    output_size_bytesINTEGEROutput size
    compression_ratioREALCompression ratio
    encode_time_secondsREALTotal encode duration
    encode_speedREALReported encode speed
    avg_bitrate_kbpsREALAverage output bitrate
    vmaf_scoreREALOptional VMAF score
    created_atDATETIMEInsert timestamp
    output_codecTEXTOutput codec recorded with the stats row

    decisions

    ColumnTypeDescription
    idINTEGERPrimary key
    job_idINTEGERForeign key to jobs.id
    actionTEXTPlanner or post-encode action
    reasonTEXTLegacy machine-readable reason string retained for compatibility
    reason_codeTEXTStable structured explanation code
    reason_payload_jsonTEXTSerialized structured explanation payload
    created_atDATETIMEInsert timestamp

    job_failure_explanations

    ColumnTypeDescription
    job_idINTEGERPrimary key and foreign key to jobs.id
    legacy_summaryTEXTLegacy failure summary retained for compatibility
    codeTEXTStable structured failure code
    payload_jsonTEXTSerialized structured failure explanation payload
    created_atTEXTInsert timestamp
    updated_atTEXTLast update timestamp

    users

    ColumnTypeDescription
    idINTEGERPrimary key
    usernameTEXTUnique login name
    password_hashTEXTArgon2 password hash
    created_atDATETIMEInsert timestamp

    sessions

    ColumnTypeDescription
    tokenTEXTPrimary key session token
    user_idINTEGERForeign key to users.id
    expires_atDATETIMEExpiration timestamp
    created_atDATETIMEInsert timestamp

    logs

    ColumnTypeDescription
    idINTEGERPrimary key
    levelTEXTLog level
    job_idINTEGEROptional job association
    messageTEXTLog message
    created_atDATETIMEInsert timestamp

    ui_preferences

    ColumnTypeDescription
    keyTEXTPrimary key
    valueTEXTStored preference value
    updated_atDATETIMELast update timestamp

    watch_dirs

    ColumnTypeDescription
    idINTEGERPrimary key
    pathTEXTUnique watched path
    enabledINTEGEREnabled flag from the legacy watch-dir projection
    recursiveINTEGERRecursive watch flag
    extensionsTEXTOptional serialized extension filter list
    created_atDATETIMEInsert timestamp
    profile_idINTEGEROptional foreign key to library_profiles.id

    notification_targets

    ColumnTypeDescription
    idINTEGERPrimary key
    nameTEXTTarget name
    target_typeTEXTLegacy target type retained for compatibility
    target_type_v2TEXTCanonical provider type such as discord_webhook, gotify, webhook, telegram, or email
    endpoint_urlTEXTLegacy destination URL projection
    auth_tokenTEXTLegacy auth token projection
    config_jsonTEXTProvider-specific target config JSON
    eventsTEXTSerialized event list
    enabledBOOLEANEnabled flag
    created_atDATETIMEInsert timestamp

    schedule_windows

    ColumnTypeDescription
    idINTEGERPrimary key
    start_timeTEXTWindow start time
    end_timeTEXTWindow end time
    days_of_weekTEXTSerialized day list
    enabledBOOLEANEnabled flag

    file_settings

    ColumnTypeDescription
    idINTEGERSingleton row key (1)
    delete_sourceBOOLEANDelete original after success
    output_extensionTEXTOutput extension
    output_suffixTEXTFilename suffix
    replace_strategyTEXTCollision policy
    output_rootTEXTOptional mirrored output root

    library_profiles

    ColumnTypeDescription
    idINTEGERPrimary key
    nameTEXTProfile name
    presetTEXTPreset identifier
    codecTEXTOutput codec
    quality_profileTEXTQuality preset
    hdr_modeTEXTHDR behavior
    audio_modeTEXTAudio policy
    crf_overrideINTEGEROptional CRF override
    custom_vfiltersTEXTOptional custom FFmpeg video filter chain
    notesTEXTOptional notes
    created_atTEXTInsert timestamp
    updated_atTEXTLast update timestamp

    health_scan_runs

    ColumnTypeDescription
    idINTEGERPrimary key
    started_atTEXTScan start timestamp
    completed_atTEXTScan completion timestamp
    files_checkedINTEGERFiles examined in the run
    issues_foundINTEGERIssues found in the run

    conversion_jobs

    Tracks uploads from the Convert workflow and their generated outputs. Cleanup runs on every upload and is driven by expires_at, the linked jobs row state, and downloaded_at.

    ColumnTypeDescription
    idINTEGERPrimary key
    upload_pathTEXTAbsolute path to the staged upload
    output_pathTEXTAbsolute path to the generated output, set once the job completes
    modeTEXTWorkflow mode (e.g. transcode, remux)
    settings_jsonTEXTSerialized conversion settings chosen in the UI
    probe_jsonTEXTCached FFprobe output for the upload
    linked_job_idINTEGERForeign key to jobs.id once the upload has been enqueued; nulled on job delete
    statusTEXTCurrent state (uploaded, queued, running, completed, downloaded, failed, cancelled)
    expires_atTEXTAbsolute timestamp after which the cleanup sweep may remove artifacts
    downloaded_atTEXTDownload timestamp; cleanup extends expires_at by conversion_download_retention_hours once this is set
    created_atTEXTInsert timestamp
    updated_atTEXTLast update timestamp

    media_probe_cache

    Caches FFprobe analysis for unchanged files. The analyzer uses the cache when the input path, mtime, size, and probe version all match.

    ColumnTypeDescription
    idINTEGERPrimary key
    input_pathTEXTAbsolute path that was probed
    mtime_nsINTEGERFile modification time fingerprint
    size_bytesINTEGERFile size fingerprint
    probe_versionTEXTFFprobe version marker
    analysis_jsonTEXTSerialized analyzer result
    created_atDATETIMEInsert timestamp
    updated_atDATETIMELast cache write timestamp
    last_accessed_atDATETIMELast successful cache read timestamp

    (input_path, mtime_ns, size_bytes, probe_version) is unique.

    hardware_detection_cache

    Stores the last successful hardware detection result so boot can reuse it when the machine/runtime fingerprint is still valid.

    ColumnTypeDescription
    idINTEGERSingleton row key (1)
    cache_keyTEXTHash of the hardware detection fingerprint
    fingerprint_jsonTEXTOS, architecture, FFmpeg/FFprobe versions, hardware settings, and cache schema version
    hardware_info_jsonTEXTSerialized selected hardware backend and supported codecs
    probe_log_jsonTEXTSerialized probe log shown in Settings -> Hardware
    detected_atDATETIMETime this detection result was produced
    updated_atDATETIMELast cache write timestamp

    api_tokens

    ColumnTypeDescription
    idINTEGERPrimary key
    nameTEXTHuman-readable token label
    token_hashTEXTHashed token value; the plaintext is shown once at issue
    access_levelTEXTStored access class (read_only or full_access)
    access_scopeTEXTOptional narrowed scope (currently arr_webhook for ARR-only webhook tokens)
    created_atDATETIMEInsert timestamp
    last_used_atDATETIMEUpdated on each successful authenticated request
    revoked_atDATETIMENon-null once the token is revoked

    encode_attempts

    Per-attempt encode history. A job may have multiple rows if it was retried.

    ColumnTypeDescription
    idINTEGERPrimary key
    job_idINTEGERForeign key to jobs.id, cascades on delete
    attempt_numberINTEGER1-based attempt index
    started_atTEXTAttempt start timestamp
    finished_atTEXTAttempt finish timestamp
    outcomeTEXTcompleted, failed, or cancelled
    failure_codeTEXTStable structured failure code for failed attempts
    failure_summaryTEXTLegacy failure summary string
    input_size_bytesINTEGERInput size at attempt time
    output_size_bytesINTEGEROutput size at attempt time
    encode_time_secondsREALWall-clock encode duration
    created_atTEXTInsert timestamp

    job_resume_sessions

    Tracks resumable segmented encodes so long-running jobs can pick up after restarts.

    ColumnTypeDescription
    idINTEGERPrimary key
    job_idINTEGERUnique foreign key to jobs.id, cascades on delete
    strategyTEXTResume strategy identifier
    plan_hashTEXTHash of the encode plan; invalidates the session if plan changes
    mtime_hashTEXTInput mtime fingerprint; invalidates on source change
    temp_dirTEXTPer-job temporary directory for segment outputs
    concat_manifest_pathTEXTFFmpeg concat manifest path
    segment_length_secsINTEGERSegment duration in seconds
    statusTEXTactive, completed, or abandoned
    created_atDATETIMEInsert timestamp
    updated_atDATETIMELast update timestamp

    job_resume_segments

    ColumnTypeDescription
    idINTEGERPrimary key
    job_idINTEGERForeign key to jobs.id, cascades on delete
    segment_indexINTEGERSegment order within the job
    start_secsREALSegment start offset in seconds
    duration_secsREALSegment duration in seconds
    temp_pathTEXTPath to the encoded segment on disk
    statusTEXTSegment state (pending, in_progress, completed, failed)
    attempt_countINTEGERRetry count for this segment
    created_atDATETIMEInsert timestamp
    updated_atDATETIMELast update timestamp

    (job_id, segment_index) is unique.

    schema_info

    ColumnTypeDescription
    keyTEXTPrimary key
    valueTEXTVersion or compatibility value

    Common keys include schema_version (13 in 0.3.2-rc.2) and min_compatible_version.

    Migration policy

    Compatibility baseline: v0.2.5.

    Migration rules:

    • CREATE TABLE IF NOT EXISTS
    • ALTER TABLE ... ADD COLUMN only with NULL allowed or a DEFAULT
    • CREATE INDEX IF NOT EXISTS
    • Never remove columns
    • Never rename columns
    • Never change column types

    The policy is additive only. Existing migration files are immutable.

    Authoritative source

    This page is generated from the editable Markdown in the Alchemist repository.

    View docs/content/database-schema.md at aeebc48

    Documentation © Brooklyn Halmstad. Licensed under CC BY-SA 4.0.

    A Dead Signal Works project.