From 530f3bc90bb45b9a87f725a9caae1ff9eacb198c Mon Sep 17 00:00:00 2001 From: Awiteb Date: Thu, 18 Jul 2024 11:01:30 +0300 Subject: [PATCH] fix: Create the foreign keys columns Signed-off-by: Awiteb --- .../src/create_incoming_chat_requests_table.rs | 5 +++++ .../src/create_outgoing_chat_requests_table.rs | 5 +++++ crates/oxidetalis_migrations/src/create_users_status.rs | 1 + 3 files changed, 11 insertions(+) diff --git a/crates/oxidetalis_migrations/src/create_incoming_chat_requests_table.rs b/crates/oxidetalis_migrations/src/create_incoming_chat_requests_table.rs index d33a5b3..a2bab90 100644 --- a/crates/oxidetalis_migrations/src/create_incoming_chat_requests_table.rs +++ b/crates/oxidetalis_migrations/src/create_incoming_chat_requests_table.rs @@ -53,6 +53,11 @@ impl MigrationTrait for Migration { .auto_increment() .primary_key(), ) + .col( + ColumnDef::new(InChatRequests::RecipientId) + .big_integer() + .not_null(), + ) .foreign_key( ForeignKey::create() .name("fk-in_chat_requests-users") diff --git a/crates/oxidetalis_migrations/src/create_outgoing_chat_requests_table.rs b/crates/oxidetalis_migrations/src/create_outgoing_chat_requests_table.rs index d033bc3..8ef6161 100644 --- a/crates/oxidetalis_migrations/src/create_outgoing_chat_requests_table.rs +++ b/crates/oxidetalis_migrations/src/create_outgoing_chat_requests_table.rs @@ -54,6 +54,11 @@ impl MigrationTrait for Migration { .auto_increment() .primary_key(), ) + .col( + ColumnDef::new(OutChatRequests::SenderId) + .big_integer() + .not_null(), + ) .foreign_key( ForeignKey::create() .name("fk-out_chat_requests-users") diff --git a/crates/oxidetalis_migrations/src/create_users_status.rs b/crates/oxidetalis_migrations/src/create_users_status.rs index a0ad213..dd7aa59 100644 --- a/crates/oxidetalis_migrations/src/create_users_status.rs +++ b/crates/oxidetalis_migrations/src/create_users_status.rs @@ -65,6 +65,7 @@ impl MigrationTrait for Migration { .auto_increment() .primary_key(), ) + .col(ColumnDef::new(UsersStatus::UserId).big_integer().not_null()) .foreign_key( ForeignKey::create() .name("fk-users_status-users")