From ad4c747aea72fb19e7edc215514999cc404bf917 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Shelton" Date: Mon, 2 Nov 2026 23:03:41 -0700 Subject: [PATCH] Adding library table. --- migrations/sqlite/0004_library.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 migrations/sqlite/0004_library.sql diff --git a/migrations/sqlite/0004_library.sql b/migrations/sqlite/0004_library.sql new file mode 100644 index 0000000..154b488 --- /dev/null +++ b/migrations/sqlite/0004_library.sql @@ -0,0 +1,10 @@ +create table library_books ( + id integer primary key autoincrement, + isbn integer default 0 not null, + -- ISBN-10 check digit. If it is the maximum allowable value in the base-11 format (i.e. the ISBN-10 ends with "X") this will be "1". + isbn_check integer default 0 not null, + title text default '' not null, + authors text default '' not null, + meta jsonb default '{}' not null +); +create unique index library_books_isbn_check_idx on library_books(isbn, isbn_check); \ No newline at end of file