home / bibliothek

copy

0 rows where location_id = 11

✎ View and edit SQL

This data as json

0 records

CREATE TABLE "copy" (
  id          INTEGER PRIMARY KEY,
  uuid        TEXT NOT NULL UNIQUE DEFAULT (lower(hex(randomblob(16)))),
  media_id    INTEGER NOT NULL REFERENCES media(id),
  location_id INTEGER REFERENCES location(id),
  ownership   TEXT NOT NULL DEFAULT 'own' CHECK (ownership IN ('own','borrowed_in','returned')),
  read_status TEXT NOT NULL DEFAULT 'unread'
              CHECK (read_status IN ('unread','next','reading','read','dropped')),
  notes       TEXT,
  updated_at  TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now')),
  deleted_at  TEXT,
  rating      INTEGER CHECK (rating BETWEEN 0 AND 7),
  read_at     TEXT
, progress_page INTEGER, progress_chapter TEXT);
CREATE INDEX ix_copy_media    ON copy(media_id);
CREATE INDEX ix_copy_location ON copy(location_id);
Powered by Datasette · Queries took 6.119ms