Skip to content

Commit

Permalink
Bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
GamePad64 committed Dec 30, 2024
1 parent 6421bbd commit ba4d113
Show file tree
Hide file tree
Showing 22 changed files with 165 additions and 174 deletions.
189 changes: 95 additions & 94 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion notifico-dbpipeline/src/entity/event.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.3
use sea_orm::entity::prelude::*;

Expand Down
2 changes: 1 addition & 1 deletion notifico-dbpipeline/src/entity/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.3
pub mod prelude;

Expand Down
2 changes: 1 addition & 1 deletion notifico-dbpipeline/src/entity/pipeline.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.3
use sea_orm::entity::prelude::*;

Expand Down
2 changes: 1 addition & 1 deletion notifico-dbpipeline/src/entity/pipeline_event_j.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.3
use sea_orm::entity::prelude::*;

Expand Down
2 changes: 1 addition & 1 deletion notifico-dbpipeline/src/entity/prelude.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.3
pub use super::event::Entity as Event;
pub use super::pipeline::Entity as Pipeline;
Expand Down
2 changes: 1 addition & 1 deletion notifico-project/src/entity/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.3
pub mod prelude;

Expand Down
2 changes: 1 addition & 1 deletion notifico-project/src/entity/prelude.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.3
pub use super::project::Entity as Project;
2 changes: 1 addition & 1 deletion notifico-project/src/entity/project.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.3
use sea_orm::entity::prelude::*;

Expand Down
6 changes: 1 addition & 5 deletions notifico-subscription/migration/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
pub use sea_orm_migration::prelude::*;

mod m20220101_000001_create_table;
mod m20241224_225755_recipient;

pub struct Migrator;

#[async_trait::async_trait]
impl MigratorTrait for Migrator {
fn migrations() -> Vec<Box<dyn MigrationTrait>> {
vec![
Box::new(m20220101_000001_create_table::Migration),
Box::new(m20241224_225755_recipient::Migration),
]
vec![Box::new(m20241224_225755_recipient::Migration)]
}

fn migration_table_name() -> DynIden {
Expand Down

This file was deleted.

33 changes: 27 additions & 6 deletions notifico-subscription/migration/src/m20241224_225755_recipient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,29 @@ impl MigrationTrait for Migration {
.await?;

manager
.create_foreign_key(
ForeignKey::create()
.from(Subscription::Table, Subscription::RecipientId)
.to(Recipient::Table, Recipient::Id)
.on_delete(ForeignKeyAction::Cascade)
.on_update(ForeignKeyAction::Restrict)
.create_table(
Table::create()
.table(Subscription::Table)
.if_not_exists()
.col(pk_uuid(Subscription::Id))
.col(uuid(Subscription::RecipientId))
.col(string(Subscription::Event))
.col(string(Subscription::Channel))
.col(boolean(Subscription::IsSubscribed))
.foreign_key(
ForeignKey::create()
.from(Subscription::Table, Subscription::RecipientId)
.to(Recipient::Table, Recipient::Id)
.on_delete(ForeignKeyAction::Cascade)
.on_update(ForeignKeyAction::Restrict),
)
.index(
Index::create()
.name("idx_subscription_project_id")
.table(Subscription::Table)
.col(Subscription::RecipientId)
.unique(),
)
.to_owned(),
)
.await?;
Expand Down Expand Up @@ -131,5 +148,9 @@ enum RecipientGroupJ {
#[derive(DeriveIden)]
enum Subscription {
Table,
Id,
Event,
Channel,
RecipientId,
IsSubscribed,
}
2 changes: 1 addition & 1 deletion notifico-subscription/src/entity/contact.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.3
use sea_orm::entity::prelude::*;

Expand Down
2 changes: 1 addition & 1 deletion notifico-subscription/src/entity/group.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.3
use sea_orm::entity::prelude::*;

Expand Down
2 changes: 1 addition & 1 deletion notifico-subscription/src/entity/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.3
pub mod prelude;

Expand Down
2 changes: 1 addition & 1 deletion notifico-subscription/src/entity/prelude.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.3
pub use super::contact::Entity as Contact;
pub use super::group::Entity as Group;
Expand Down
10 changes: 9 additions & 1 deletion notifico-subscription/src/entity/recipient.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.3
use sea_orm::entity::prelude::*;

Expand All @@ -18,6 +18,8 @@ pub enum Relation {
Contact,
#[sea_orm(has_many = "super::recipient_group_j::Entity")]
RecipientGroupJ,
#[sea_orm(has_one = "super::subscription::Entity")]
Subscription,
}

impl Related<super::contact::Entity> for Entity {
Expand All @@ -32,6 +34,12 @@ impl Related<super::recipient_group_j::Entity> for Entity {
}
}

impl Related<super::subscription::Entity> for Entity {
fn to() -> RelationDef {
Relation::Subscription.def()
}
}

impl Related<super::group::Entity> for Entity {
fn to() -> RelationDef {
super::recipient_group_j::Relation::Group.def()
Expand Down
2 changes: 1 addition & 1 deletion notifico-subscription/src/entity/recipient_group_j.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.3
use sea_orm::entity::prelude::*;

Expand Down
19 changes: 17 additions & 2 deletions notifico-subscription/src/entity/subscription.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.3
use sea_orm::entity::prelude::*;

Expand All @@ -15,6 +15,21 @@ pub struct Model {
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
pub enum Relation {
#[sea_orm(
belongs_to = "super::recipient::Entity",
from = "Column::RecipientId",
to = "super::recipient::Column::Id",
on_update = "Restrict",
on_delete = "Cascade"
)]
Recipient,
}

impl Related<super::recipient::Entity> for Entity {
fn to() -> RelationDef {
Relation::Recipient.def()
}
}

impl ActiveModelBehavior for ActiveModel {}
2 changes: 1 addition & 1 deletion notifico-template/src/entity/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.3
pub mod prelude;

Expand Down
2 changes: 1 addition & 1 deletion notifico-template/src/entity/prelude.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.3
pub use super::template::Entity as Template;
2 changes: 1 addition & 1 deletion notifico-template/src/entity/template.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.2
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.3
use sea_orm::entity::prelude::*;

Expand Down

0 comments on commit ba4d113

Please sign in to comment.