alter table project_app drop column name; alter table project_app add app_id int; alter table project_app drop column url; alter table project_app drop column lock; alter table project_app add constraint project_app_app_id_fk foreign key (app_id) references app;