Well, I don't user ALTER TABLE (I just DROP and reCREATE
my tables), but I see three problems.
The MySQL documentation for 'alter table <table> drop
foreign key ...' says you should use this syntax:
ALTER TABLE yourtablename DROP FOREIGN KEY internally_generated_foreign_key_id
Which means you left out the name of the foreign key.
You can see this constraint name by doing a:
SHOW CREATE TABLE <tablename>;
The second problem is a simple typo:
you are referencing the field 'prgcode' with 'progcode'.
A third problem is you didn't set field 'prgcode' to 'NOT NULL'.
(You are allowing NULLs in an index field.)
-lv