mirror of
https://github.com/danbulant/Portfolio
synced 2026-07-06 03:20:53 +00:00
fix: parent candidate fk
This commit is contained in:
parent
6c0e187c5e
commit
f6f8f45350
1 changed files with 2 additions and 2 deletions
|
|
@ -10,8 +10,8 @@ impl MigrationTrait for Migration {
|
||||||
async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
|
async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
|
||||||
manager.create_foreign_key(ForeignKey::create()
|
manager.create_foreign_key(ForeignKey::create()
|
||||||
.name("candidate_fk")
|
.name("candidate_fk")
|
||||||
.from(Parent::Table, Candidate::Application)
|
.from(Parent::Table, Parent::Application)
|
||||||
.to(Parent::Table, Parent::Application)
|
.to(Candidate::Table, Candidate::Application)
|
||||||
.on_delete(ForeignKeyAction::Cascade)
|
.on_delete(ForeignKeyAction::Cascade)
|
||||||
.on_update(ForeignKeyAction::Cascade)
|
.on_update(ForeignKeyAction::Cascade)
|
||||||
.to_owned()).await
|
.to_owned()).await
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue