Remove role and roleId from group project membership

This commit is contained in:
Tuan Dang
2024-04-03 20:30:14 -07:00
parent 457edef5fe
commit e1d9f779b2
7 changed files with 6 additions and 36 deletions
@@ -37,9 +37,6 @@ export async function up(knex: Knex): Promise<void> {
if (!(await knex.schema.hasTable(TableName.GroupProjectMembership))) {
await knex.schema.createTable(TableName.GroupProjectMembership, (t) => {
t.uuid("id", { primaryKey: true }).defaultTo(knex.fn.uuid());
t.string("role").notNullable();
t.uuid("roleId");
t.foreign("roleId").references("id").inTable(TableName.ProjectRoles);
t.string("projectId").notNullable();
t.foreign("projectId").references("id").inTable(TableName.Project).onDelete("CASCADE");
t.uuid("groupId").notNullable();
@@ -9,8 +9,6 @@ import { TImmutableDBKeys } from "./models";
export const GroupProjectMembershipsSchema = z.object({
id: z.string().uuid(),
role: z.string(),
roleId: z.string().uuid().nullable().optional(),
projectId: z.string(),
groupId: z.string().uuid(),
createdAt: z.date(),