# table_registry

name: namespace_store
prototype:
  namespace_store (
      namespace TEXT NOT NULL,
      key TEXT NOT NULL,
      value record NOT NULL,
      PRIMARY KEY (namespace, key)
  )


name: authorized_users
prototype:
  authorized_users (
      username TEXT PRIMARY KEY NOT NULL,
      password TEXT NOT NULL,
      created_on REAL NOT NULL,
      salt TEXT NOT NULL,
      source TEXT NOT NULL,
      jwt_secret TEXT,
      jwk_id TEXT,
      groups pyjson
  )


name: job_history
prototype:
  job_history (
      job_id INTEGER PRIMARY KEY ASC,
      user TEXT NOT NULL,
      filename TEXT,
      status TEXT NOT NULL,
      start_time REAL NOT NULL,
      end_time REAL,
      print_duration REAL NOT NULL,
      total_duration REAL NOT NULL,
      filament_used REAL NOT NULL,
      metadata pyjson,
      auxiliary_data pyjson NOT NULL,
      instance_id TEXT NOT NULL
  )


name: job_totals
prototype:
  job_totals (
      provider TEXT NOT NULL,
      field TEXT NOT NULL,
      maximum REAL,
      total REAL,
      instance_id TEXT NOT NULL,
      PRIMARY KEY (provider, field, instance_id)
  )


