I am creating 2 tables in my database:
DROP TABLE IF EXISTS `med_pharmacy`; CREATE TABLE IF NOT EXISTS `med_pharmacy` ( `med_pharmacy_id` int(11) NOT NULL
The column referenced in a foreign key must be indexed. You need to add an index on medication.med_id. In fact, this should probably be the primary key of the table.
medication.med_id
ALTER TABLE medication ADD PRIMARY KEY (med_id);