PAN-52 Added findByName to the TheoremRepository, and to the TheoremController as well as the corresponding tests, and a foreign key mapping from the proofs table to the corresponding theorem in the theorems table

This commit is contained in:
2019-03-14 12:28:59 -06:00
parent d560f5831f
commit 4d0658a268
4 changed files with 83 additions and 9 deletions
@@ -35,13 +35,15 @@ version int default 1
);
CREATE TABLE proofs
(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(512) NOT NULL,
branch VARCHAR(512) NOT NULL,
referenced_definitions JSON,
referenced_theorems JSON,
date_added DATE,
last_updated DATE,
version INT DEFAULT 1,
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(512) NOT NULL,
branch VARCHAR(512) NOT NULL,
theorem INT NOT NULL,
FOREIGN KEY fk_theorem (theorem) REFERENCES theorems (id) ON DELETE NO ACTION ON UPDATE NO ACTION,
referenced_definitions JSON,
referenced_theorems JSON,
date_added DATE,
last_updated DATE,
version INT DEFAULT 1,
PRIMARY KEY (id)
)
);