use score;


DROP TABLE learning_blocks_links;
DROP TABLE circular_challenges_links;
DROP TABLE links;

 CREATE TABLE circular_challenges_links 
   (id int NOT NULL AUTO_INCREMENT, lien text NOT NULL,
   descriptionLien text NOT NULL, circularChallengesId int NOT NULL, PRIMARY KEY (id));
   
 CREATE TABLE learning_blocks_links(id int NOT NULL AUTO_INCREMENT, lien text NOT NULL, descriptionLien text NOT NULL,
 learningBlocksId int NOT NULL, PRIMARY KEY (id));

 
ALTER TABLE circular_challenges_links
ADD CONSTRAINT 
FK_0cfbbdac5dc0683c0881d0ddc6f FOREIGN KEY 
(circularChallengesId) REFERENCES circular_challenges(id) ON DELETE CASCADE ON UPDATE CASCADE;
    
 ALTER TABLE learning_blocks_links ADD CONSTRAINT 
 FK_3716b5e2e6aae93534a7958c761
 FOREIGN KEY (learningBlocksId) REFERENCES learning_blocks(id) ON DELETE CASCADE ON UPDATE CASCADE;
   
ALTER TABLE circular_economy DROP COLUMN videoDescription, DROP COLUMN videoUrl;