diff --git a/migrations/2024-11-25-232658_init/up.sql b/migrations/2024-11-25-232658_init/up.sql index feb78ae..9af6750 100644 --- a/migrations/2024-11-25-232658_init/up.sql +++ b/migrations/2024-11-25-232658_init/up.sql @@ -18,7 +18,6 @@ CREATE TABLE teams ( ); CREATE TABLE team_memberships ( - roles TEXT[] NOT NULL DEFAULT '{}', team_id UUID NOT NULL REFERENCES teams(id) ON DELETE CASCADE, user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE, PRIMARY KEY (team_id, user_id) @@ -47,7 +46,7 @@ CREATE TABLE IF NOT EXISTS channels ( team_id UUID NOT NULL REFERENCES teams(id) ON DELETE CASCADE, name TEXT NOT NULL, enable_by_default BOOLEAN NOT NULL DEFAULT FALSE, - backend_config JSONB NOT NULL DEFAULT '{}'::JSONB + backend_config JSONB NOT NULL ); CREATE TABLE IF NOT EXISTS channel_selections ( diff --git a/src/router.rs b/src/router.rs index 61ee518..0c7d8b2 100644 --- a/src/router.rs +++ b/src/router.rs @@ -214,7 +214,6 @@ async fn post_new_team( let team_membership = TeamMembership { team_id: team_id.clone(), user_id: current_user.id, - roles: vec![Some("OWNER".to_string())], }; db_conn .interact(move |conn| { diff --git a/src/schema.rs b/src/schema.rs index 11f4874..1ea0c74 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -65,7 +65,6 @@ diesel::table! { team_memberships (team_id, user_id) { team_id -> Uuid, user_id -> Uuid, - roles -> Array>, } } diff --git a/src/team_memberships.rs b/src/team_memberships.rs index d6392d5..0b39dce 100644 --- a/src/team_memberships.rs +++ b/src/team_memberships.rs @@ -20,7 +20,6 @@ use crate::{ pub struct TeamMembership { pub team_id: Uuid, pub user_id: Uuid, - pub roles: Vec>, } impl TeamMembership {