When using the mySQL database, I can't seem to get my foreign keys to stay when I define them through phpMyAdmin. As an example, I use the following table definition:
But I can still insert rows that break the foreign keys and when exporting to an sql file, the foreign keys are not in the definition. What's going on here?
Code:
CREATE TABLE `user_source` (
`user_name` varchar(15) NOT NULL,
`url` varchar(50) NOT NULL,
PRIMARY KEY (`user_name`,`url`),
CONSTRAINT user_source_user_name_fk FOREIGN KEY (user_name) REFERENCES user(user_name),
CONSTRAINT user_source_url_fk FOREIGN KEY (url) REFERENCES source(url)
)