Skip to content

Commit

Permalink
Fix book_info.sql and dump entire database to sql and sqlite3
Browse files Browse the repository at this point in the history
book_info.sql had some sqlite3 isms, that was preventing mysql from
loading it. I noticed this when using the new docker-compose file. After
fixing this, I did a complete to to bible-mysql.sql so that it matches
the sum of what is in sql/.

At the same time, I updated the README to reflect that sqlite is not a
simplified database, it is really just a different format. It contains
all the information from the mysql database, with the addition of the
cross reference (The readme did say cross-reference was included, but it
actually wasnt included in reality. I have now included it)
  • Loading branch information
Jmainguy committed Jun 6, 2021
1 parent 963ff9c commit cdfc9e6
Show file tree
Hide file tree
Showing 4 changed files with 960 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Summary:

- *bible-mysql.sql* (MySQL) is the main database and most feature-oriented due to contributions from developers. It is suggested you use that for most things, or at least convert the information from it.
- *cross_references-mysql.sql* (MySQL) is the cross-reference table. It has been separated to become an optional feature. This is converted from the project at http://www.openbible.info/labs/cross-references/.
- *bible-sqlite.db* (SQLite) is a basic simplified database for simpler applications (includes cross-references too).
- *bible-sqlite.db* (SQLite) is converted from bible-mysql.sql using mysql2sqlite. (includes cross-references too).
- *cross_references.txt* is the source cross-reference file obtained from http://www.openbible.info/labs/cross-references/


Expand Down
955 changes: 949 additions & 6 deletions bible-mysql.sql

Large diffs are not rendered by default.

Binary file modified bible-sqlite.db
Binary file not shown.
20 changes: 10 additions & 10 deletions sql/book_info.sql
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "book_info" (
"order" INTEGER NOT NULL UNIQUE,
"title_short" TEXT NOT NULL UNIQUE,
"title_full" TEXT NOT NULL UNIQUE,
"abbreviation" TEXT NOT NULL UNIQUE,
"category" TEXT NOT NULL,
"otnt" TEXT NOT NULL
, "chapters" INTEGER);
CREATE TABLE IF NOT EXISTS `book_info` (
`order` int NOT NULL AUTO_INCREMENT UNIQUE,
`title_short` text NOT NULL UNIQUE,
`title_full` text NOT NULL UNIQUE,
`abbreviation` text NOT NULL UNIQUE,
`category` text NOT NULL,
`otnt` text NOT NULL,
`chapters` int,
PRIMARY KEY (`order`)
);
INSERT INTO book_info VALUES(1,'Genesis','The First Book of Moses Called Genesis','Gen.','Law','OT',50);
INSERT INTO book_info VALUES(2,'Exodus','The Second Book of Moses Called Exodus','Ex.','Law','OT',40);
INSERT INTO book_info VALUES(3,'Leviticus','The Third Book of Moses Called Leviticus','Lev.','Law','OT',27);
Expand Down

0 comments on commit cdfc9e6

Please sign in to comment.