Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
collab: Remove unused models left over from chat (#42390)
Marshall Bowers32ec1037e15d
diff --git a/crates/collab/src/db/tables.rs b/crates/collab/src/db/tables.rsindex 32c4570af58..e619acaaf2b 100644--- a/crates/collab/src/db/tables.rs+++ b/crates/collab/src/db/tables.rs@@ -6,8 +6,6 @@ pub mod channel;pub mod channel_buffer_collaborator;pub mod channel_chat_participant;pub mod channel_member;-pub mod channel_message;-pub mod channel_message_mention;pub mod contact;pub mod contributor;pub mod embedding;@@ -18,7 +16,6 @@ pub mod language_server;pub mod notification;pub mod notification_kind;pub mod observed_buffer_edits;-pub mod observed_channel_messages;pub mod project;pub mod project_collaborator;pub mod project_repository;diff --git a/crates/collab/src/db/tables/channel_message.rs b/crates/collab/src/db/tables/channel_message.rsdeleted file mode 100644index 2ec776f189c..00000000000--- a/crates/collab/src/db/tables/channel_message.rs+++ /dev/null@@ -1,47 +0,0 @@-use crate::db::{ChannelId, MessageId, UserId};-use sea_orm::entity::prelude::*;-use time::PrimitiveDateTime;--#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]-#[sea_orm(table_name = "channel_messages")]-pub struct Model {- #[sea_orm(primary_key)]- pub id: MessageId,- pub channel_id: ChannelId,- pub sender_id: UserId,- pub body: String,- pub sent_at: PrimitiveDateTime,- pub edited_at: Option<PrimitiveDateTime>,- pub nonce: Uuid,- pub reply_to_message_id: Option<MessageId>,-}--impl ActiveModelBehavior for ActiveModel {}--#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]-pub enum Relation {- #[sea_orm(- belongs_to = "super::channel::Entity",- from = "Column::ChannelId",- to = "super::channel::Column::Id"- )]- Channel,- #[sea_orm(- belongs_to = "super::user::Entity",- from = "Column::SenderId",- to = "super::user::Column::Id"- )]- Sender,-}--impl Related<super::channel::Entity> for Entity {- fn to() -> RelationDef {- Relation::Channel.def()- }-}--impl Related<super::user::Entity> for Entity {- fn to() -> RelationDef {- Relation::Sender.def()- }-}diff --git a/crates/collab/src/db/tables/channel_message_mention.rs b/crates/collab/src/db/tables/channel_message_mention.rsdeleted file mode 100644index 6155b057f0c..00000000000--- a/crates/collab/src/db/tables/channel_message_mention.rs+++ /dev/null@@ -1,43 +0,0 @@-use crate::db::{MessageId, UserId};-use sea_orm::entity::prelude::*;--#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]-#[sea_orm(table_name = "channel_message_mentions")]-pub struct Model {- #[sea_orm(primary_key)]- pub message_id: MessageId,- #[sea_orm(primary_key)]- pub start_offset: i32,- pub end_offset: i32,- pub user_id: UserId,-}--impl ActiveModelBehavior for ActiveModel {}--#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]-pub enum Relation {- #[sea_orm(- belongs_to = "super::channel_message::Entity",- from = "Column::MessageId",- to = "super::channel_message::Column::Id"- )]- Message,- #[sea_orm(- belongs_to = "super::user::Entity",- from = "Column::UserId",- to = "super::user::Column::Id"- )]- MentionedUser,-}--impl Related<super::channel::Entity> for Entity {- fn to() -> RelationDef {- Relation::Message.def()- }-}--impl Related<super::user::Entity> for Entity {- fn to() -> RelationDef {- Relation::MentionedUser.def()- }-}diff --git a/crates/collab/src/db/tables/observed_channel_messages.rs b/crates/collab/src/db/tables/observed_channel_messages.rsdeleted file mode 100644index 18259f84427..00000000000--- a/crates/collab/src/db/tables/observed_channel_messages.rs+++ /dev/null@@ -1,41 +0,0 @@-use crate::db::{ChannelId, MessageId, UserId};-use sea_orm::entity::prelude::*;--#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]-#[sea_orm(table_name = "observed_channel_messages")]-pub struct Model {- #[sea_orm(primary_key)]- pub user_id: UserId,- pub channel_id: ChannelId,- pub channel_message_id: MessageId,-}--#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]-pub enum Relation {- #[sea_orm(- belongs_to = "super::channel::Entity",- from = "Column::ChannelId",- to = "super::channel::Column::Id"- )]- Channel,- #[sea_orm(- belongs_to = "super::user::Entity",- from = "Column::UserId",- to = "super::user::Column::Id"- )]- User,-}--impl Related<super::channel::Entity> for Entity {- fn to() -> RelationDef {- Relation::Channel.def()- }-}--impl Related<super::user::Entity> for Entity {- fn to() -> RelationDef {- Relation::User.def()- }-}--impl ActiveModelBehavior for ActiveModel {}