fix: Create the foreign keys columns

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb 2024-07-18 11:01:30 +03:00
parent ccc0c2954b
commit 530f3bc90b
Signed by: awiteb
GPG key ID: 3F6B55640AA6682F
3 changed files with 11 additions and 0 deletions

View file

@ -53,6 +53,11 @@ impl MigrationTrait for Migration {
.auto_increment() .auto_increment()
.primary_key(), .primary_key(),
) )
.col(
ColumnDef::new(InChatRequests::RecipientId)
.big_integer()
.not_null(),
)
.foreign_key( .foreign_key(
ForeignKey::create() ForeignKey::create()
.name("fk-in_chat_requests-users") .name("fk-in_chat_requests-users")

View file

@ -54,6 +54,11 @@ impl MigrationTrait for Migration {
.auto_increment() .auto_increment()
.primary_key(), .primary_key(),
) )
.col(
ColumnDef::new(OutChatRequests::SenderId)
.big_integer()
.not_null(),
)
.foreign_key( .foreign_key(
ForeignKey::create() ForeignKey::create()
.name("fk-out_chat_requests-users") .name("fk-out_chat_requests-users")

View file

@ -65,6 +65,7 @@ impl MigrationTrait for Migration {
.auto_increment() .auto_increment()
.primary_key(), .primary_key(),
) )
.col(ColumnDef::new(UsersStatus::UserId).big_integer().not_null())
.foreign_key( .foreign_key(
ForeignKey::create() ForeignKey::create()
.name("fk-users_status-users") .name("fk-users_status-users")