fix: parent candidate fk

This commit is contained in:
EETagent 2022-10-30 14:29:58 +01:00
parent 6c0e187c5e
commit f6f8f45350

View file

@ -10,8 +10,8 @@ impl MigrationTrait for Migration {
async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
manager.create_foreign_key(ForeignKey::create()
.name("candidate_fk")
.from(Parent::Table, Candidate::Application)
.to(Parent::Table, Parent::Application)
.from(Parent::Table, Parent::Application)
.to(Candidate::Table, Candidate::Application)
.on_delete(ForeignKeyAction::Cascade)
.on_update(ForeignKeyAction::Cascade)
.to_owned()).await