Exercise 1: Applying the Raw Schema — Possible Solution ==================================================================== -- schema.sql CREATE TABLE pages ( id INT AUTO_INCREMENT PRIMARY KEY, slug VARCHAR(255) NOT NULL, full_path VARCHAR(1024) NOT NULL UNIQUE, title VARCHAR(255) NOT NULL, body TEXT, parent_id INT, FOREIGN KEY (parent_id) REFERENCES pages(id) ON DELETE RESTRICT ); APPLYING IT ------------------------------ mysql -u root -p website < schema.sql CONFIRMATION ------------------------------ Running SHOW TABLES; and DESCRIBE pages; against the database confirms the pages table now exists with exactly the columns declared above, including the self-referencing foreign key on parent_id pointing back at the same table's own id column. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly writes the schema exactly as specified in the chapter, and correctly applies it directly via the mysql CLI, confirming the table was created successfully with no ORM tooling involved at all.