-var expectedMysqlDumpDDL = "CREATE INDEX fk_author_id_11 ON Books(author_id)|CREATE INDEX fk_book_authors_author_id_5 ON BookAuthors(author_id)|CREATE INDEX fk_customer_id_21 ON Orders(customer_id)|CREATE INDEX fk_genre_id_13 ON Books(genre_id)|CREATE INDEX fk_publisher_id_12 ON Books(publisher_id)|CREATE INDEX fk_reviews_customer_id_29 ON Reviews(customer_id)|CREATE TABLE Authors ( author_id INT64 NOT NULL, first_name STRING(50) NOT NULL, last_name STRING(50) NOT NULL, biography STRING(MAX),) PRIMARY KEY(author_id)|CREATE TABLE BookAuthors ( book_author_id INT64 NOT NULL, book_id INT64 NOT NULL, author_id INT64 NOT NULL,) PRIMARY KEY(book_author_id)|CREATE TABLE Books ( book_id INT64 NOT NULL, title STRING(255) NOT NULL, isbn STRING(20) NOT NULL, publication_date DATE, price NUMERIC NOT NULL, stock_quantity INT64, author_id INT64, publisher_id INT64, genre_id INT64, is_featured BOOL, is_available BOOL, edition_number BOOL, page_count INT64, cover_image_binary BYTES(100), cover_image_varbinary BYTES(200), abstract_blob BYTES(MAX), sample_chapter_mediumblob BYTES(MAX), notes_tinyblob BYTES(MAX), full_text_longblob BYTES(MAX), flags BYTES(MAX), series_code STRING(10), volume_code STRING(5), last_updated TIMESTAMP, discount_rate NUMERIC, special_price NUMERIC, average_rating FLOAT64, binding_type STRING(MAX), weight_grams FLOAT32, internal_id INT64, catalog_id INT64, shelf_number INT64, inventory_code INT64, metadata JSON, keywords STRING(MAX), description_text STRING(MAX), long_description_mediumtext STRING(MAX), short_summary_tinytext STRING(MAX), full_review_longtext STRING(MAX), last_modified TIMESTAMP, product_code STRING(50), ean_code STRING(13),) PRIMARY KEY(book_id)|CREATE TABLE Customers ( customer_id INT64 NOT NULL, first_name STRING(50) NOT NULL, last_name STRING(50) NOT NULL, email STRING(100) NOT NULL, phone_number STRING(20), address STRING(MAX), registration_date TIMESTAMP,) PRIMARY KEY(customer_id)|CREATE TABLE Genres ( genre_id INT64 NOT NULL, name STRING(50) NOT NULL,) PRIMARY KEY(genre_id)|CREATE TABLE OrderItems ( order_item_id INT64 NOT NULL, order_id INT64 NOT NULL, book_id INT64 NOT NULL, quantity INT64 NOT NULL, price_at_purchase NUMERIC NOT NULL,) PRIMARY KEY(order_item_id)|CREATE TABLE Orders ( order_id INT64 NOT NULL, customer_id INT64 NOT NULL, order_date TIMESTAMP, shipping_address STRING(MAX) NOT NULL, order_status STRING(MAX), total_amount NUMERIC NOT NULL,) PRIMARY KEY(order_id)|CREATE TABLE Publishers ( publisher_id INT64 NOT NULL, name STRING(100) NOT NULL, address STRING(MAX),) PRIMARY KEY(publisher_id)|CREATE TABLE Reviews ( review_id INT64 NOT NULL, book_id INT64 NOT NULL, customer_id INT64 NOT NULL, rating INT64, comment STRING(MAX), review_date TIMESTAMP, CONSTRAINT reviews_chk_1 CHECK((rating>=1) AND (rating<=5)),) PRIMARY KEY(review_id)|CREATE UNIQUE INDEX book_id ON BookAuthors(book_id, author_id)|CREATE UNIQUE INDEX book_id_28 ON Reviews(book_id, customer_id)|CREATE UNIQUE INDEX email ON Customers(email)|CREATE UNIQUE INDEX isbn ON Books(isbn)|CREATE UNIQUE INDEX name ON Genres(name)|CREATE UNIQUE INDEX name_23 ON Publishers(name)"
0 commit comments