I have a MySQL DB defined by the following SQL statements:
CREATE TABLE author
(
author_id
int NOT NULL AUTO_INCREMENT,
first_name
varchar(45) DEFAULT NULL,
middle_name
varchar(45) DEFAULT NULL,
last_name
varchar(45) DEFAULT NULL,
suffix
varchar(45) DEFAULT NULL,
preferred_name
varchar(45) DEFAULT NULL,
birth
date DEFAULT NULL,
death
date DEFAULT NULL,
PRIMARY KEY (author_id
)
CREATE TABLE books
(
book_id
int NOT NULL AUTO_INCREMENT,
bk_title
varchar(100) DEFAULT NULL,
bk_edition
varchar(45) DEFAULT NULL,
bk_year
year DEFAULT NULL,
bk_isbn
varchar(45) DEFAULT NULL,
bk_type
enum(‘H’,‘T’,‘F’,‘P’,’’) DEFAULT NULL,
author_id
int NOT NULL,
publisher_id
int NOT NULL,
PRIMARY KEY (book_id
),
KEY author_id-indx
(author_id
),
KEY pub_id-index
(publisher_id
),
CONSTRAINT fk_books_1
FOREIGN KEY (author_id
) REFERENCES author
(author_id
),
CONSTRAINT fk_books_2
FOREIGN KEY (publisher_id
) REFERENCES publisher
(publisher_id
)
CREATE TABLE publisher
(
publisher_id
int NOT NULL AUTO_INCREMENT,
pub_name
varchar(45) DEFAULT NULL,
pub_address
varchar(45) DEFAULT NULL,
pub_city
varchar(45) DEFAULT NULL,
pub_state
char(2) DEFAULT NULL,
pub_zip
char(10) DEFAULT NULL,
imprint_id
int DEFAULT NULL,
PRIMARY KEY (publisher_id
)
CREATE TABLE imprint
(
imprint_id
int NOT NULL AUTO_INCREMENT,
imprint_name
varchar(45) NOT NULL,
publisher_id
int DEFAULT NULL,
PRIMARY KEY (imprint_id
),
KEY idx_imprint_publisher_id
(publisher_id
),
CONSTRAINT fk_imprint_1
FOREIGN KEY (publisher_id
) REFERENCES publisher
(publisher_id
)
When I connect the DB to LO Base, I can show every table except the Books table. Whenever I try to access the Books, I get the following message:
Due to an error, LibreOffice crashed. All the files you were working on will be saved. The next time LibreOffice is launched, your files will be recovered automatically.
I have checked the books table for some error in the definition. Can anyone shed any light on this? BTW, I am on Ubuntu 22.04 LTS.