feat: premium workspace usernames

This commit is contained in:
Henry
2025-01-02 20:40:29 +00:00
parent b5dc9433db
commit 67e714b8b0
41 changed files with 1767 additions and 9088 deletions

View File

@@ -1,108 +1,10 @@
{
"version": "5",
"dialect": "pg",
"id": "32295e0d-123f-4eae-b323-1fe55e3c4dca",
"id": "3bf82a86-d7ff-4ab7-81ed-024350dfb32a",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "7",
"dialect": "postgresql",
"tables": {
"account": {
"name": "account",
"schema": "",
"columns": {
"userId": {
"name": "userId",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"type": {
"name": "type",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"provider": {
"name": "provider",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"providerAccountId": {
"name": "providerAccountId",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"refresh_token": {
"name": "refresh_token",
"type": "text",
"primaryKey": false,
"notNull": false
},
"access_token": {
"name": "access_token",
"type": "text",
"primaryKey": false,
"notNull": false
},
"expires_at": {
"name": "expires_at",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"token_type": {
"name": "token_type",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"scope": {
"name": "scope",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"id_token": {
"name": "id_token",
"type": "text",
"primaryKey": false,
"notNull": false
},
"session_state": {
"name": "session_state",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"account_userId_user_id_fk": {
"name": "account_userId_user_id_fk",
"tableFrom": "account",
"tableTo": "user",
"columnsFrom": [
"userId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"account_provider_providerAccountId": {
"name": "account_provider_providerAccountId",
"columns": [
"provider",
"providerAccountId"
]
}
},
"uniqueConstraints": {}
},
"board": {
"public.board": {
"name": "board",
"schema": "",
"columns": {
@@ -147,8 +49,7 @@
"name": "deletedAt",
"type": "timestamp",
"primaryKey": false,
"notNull": false,
"default": "now()"
"notNull": false
},
"deletedBy": {
"name": "deletedBy",
@@ -220,7 +121,7 @@
"columnsTo": [
"id"
],
"onDelete": "no action",
"onDelete": "cascade",
"onUpdate": "no action"
}
},
@@ -233,9 +134,241 @@
"publicId"
]
}
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"_card_workspace_members": {
"public.card_activity": {
"name": "card_activity",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "bigserial",
"primaryKey": true,
"notNull": true
},
"publicId": {
"name": "publicId",
"type": "varchar(12)",
"primaryKey": false,
"notNull": true
},
"type": {
"name": "type",
"type": "card_activity_type",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"cardId": {
"name": "cardId",
"type": "bigint",
"primaryKey": false,
"notNull": true
},
"fromIndex": {
"name": "fromIndex",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"toIndex": {
"name": "toIndex",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"fromListId": {
"name": "fromListId",
"type": "bigint",
"primaryKey": false,
"notNull": false
},
"toListId": {
"name": "toListId",
"type": "bigint",
"primaryKey": false,
"notNull": false
},
"labelId": {
"name": "labelId",
"type": "bigint",
"primaryKey": false,
"notNull": false
},
"workspaceMemberId": {
"name": "workspaceMemberId",
"type": "bigint",
"primaryKey": false,
"notNull": false
},
"fromTitle": {
"name": "fromTitle",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"toTitle": {
"name": "toTitle",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"fromDescription": {
"name": "fromDescription",
"type": "text",
"primaryKey": false,
"notNull": false
},
"toDescription": {
"name": "toDescription",
"type": "text",
"primaryKey": false,
"notNull": false
},
"createdBy": {
"name": "createdBy",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"createdAt": {
"name": "createdAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"commentId": {
"name": "commentId",
"type": "bigint",
"primaryKey": false,
"notNull": false
},
"fromComment": {
"name": "fromComment",
"type": "text",
"primaryKey": false,
"notNull": false
},
"toComment": {
"name": "toComment",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"card_activity_cardId_card_id_fk": {
"name": "card_activity_cardId_card_id_fk",
"tableFrom": "card_activity",
"tableTo": "card",
"columnsFrom": [
"cardId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"card_activity_fromListId_list_id_fk": {
"name": "card_activity_fromListId_list_id_fk",
"tableFrom": "card_activity",
"tableTo": "list",
"columnsFrom": [
"fromListId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"card_activity_toListId_list_id_fk": {
"name": "card_activity_toListId_list_id_fk",
"tableFrom": "card_activity",
"tableTo": "list",
"columnsFrom": [
"toListId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"card_activity_labelId_label_id_fk": {
"name": "card_activity_labelId_label_id_fk",
"tableFrom": "card_activity",
"tableTo": "label",
"columnsFrom": [
"labelId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"card_activity_workspaceMemberId_workspace_members_id_fk": {
"name": "card_activity_workspaceMemberId_workspace_members_id_fk",
"tableFrom": "card_activity",
"tableTo": "workspace_members",
"columnsFrom": [
"workspaceMemberId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"card_activity_createdBy_user_id_fk": {
"name": "card_activity_createdBy_user_id_fk",
"tableFrom": "card_activity",
"tableTo": "user",
"columnsFrom": [
"createdBy"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"card_activity_commentId_card_comments_id_fk": {
"name": "card_activity_commentId_card_comments_id_fk",
"tableFrom": "card_activity",
"tableTo": "card_comments",
"columnsFrom": [
"commentId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"card_activity_publicId_unique": {
"name": "card_activity_publicId_unique",
"nullsNotDistinct": false,
"columns": [
"publicId"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public._card_workspace_members": {
"name": "_card_workspace_members",
"schema": "",
"columns": {
@@ -277,22 +410,25 @@
"columnsTo": [
"id"
],
"onDelete": "no action",
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"_card_workspace_members_cardId_workspaceMemberId": {
"name": "_card_workspace_members_cardId_workspaceMemberId",
"_card_workspace_members_cardId_workspaceMemberId_pk": {
"name": "_card_workspace_members_cardId_workspaceMemberId_pk",
"columns": [
"cardId",
"workspaceMemberId"
]
}
},
"uniqueConstraints": {}
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"card": {
"public.card": {
"name": "card",
"schema": "",
"columns": {
@@ -408,7 +544,7 @@
"columnsTo": [
"id"
],
"onDelete": "no action",
"onDelete": "cascade",
"onUpdate": "no action"
},
"card_importId_import_id_fk": {
@@ -434,9 +570,12 @@
"publicId"
]
}
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"_card_labels": {
"public._card_labels": {
"name": "_card_labels",
"schema": "",
"columns": {
@@ -478,22 +617,141 @@
"columnsTo": [
"id"
],
"onDelete": "no action",
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"_card_labels_cardId_labelId": {
"name": "_card_labels_cardId_labelId",
"_card_labels_cardId_labelId_pk": {
"name": "_card_labels_cardId_labelId_pk",
"columns": [
"cardId",
"labelId"
]
}
},
"uniqueConstraints": {}
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"import": {
"public.card_comments": {
"name": "card_comments",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "bigserial",
"primaryKey": true,
"notNull": true
},
"publicId": {
"name": "publicId",
"type": "varchar(12)",
"primaryKey": false,
"notNull": true
},
"comment": {
"name": "comment",
"type": "text",
"primaryKey": false,
"notNull": true
},
"cardId": {
"name": "cardId",
"type": "bigint",
"primaryKey": false,
"notNull": true
},
"createdBy": {
"name": "createdBy",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"createdAt": {
"name": "createdAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updatedAt": {
"name": "updatedAt",
"type": "timestamp",
"primaryKey": false,
"notNull": false
},
"deletedAt": {
"name": "deletedAt",
"type": "timestamp",
"primaryKey": false,
"notNull": false
},
"deletedBy": {
"name": "deletedBy",
"type": "uuid",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"card_comments_cardId_card_id_fk": {
"name": "card_comments_cardId_card_id_fk",
"tableFrom": "card_comments",
"tableTo": "card",
"columnsFrom": [
"cardId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"card_comments_createdBy_user_id_fk": {
"name": "card_comments_createdBy_user_id_fk",
"tableFrom": "card_comments",
"tableTo": "user",
"columnsFrom": [
"createdBy"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"card_comments_deletedBy_user_id_fk": {
"name": "card_comments_deletedBy_user_id_fk",
"tableFrom": "card_comments",
"tableTo": "user",
"columnsFrom": [
"deletedBy"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"card_comments_publicId_unique": {
"name": "card_comments_publicId_unique",
"nullsNotDistinct": false,
"columns": [
"publicId"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.import": {
"name": "import",
"schema": "",
"columns": {
@@ -512,12 +770,14 @@
"source": {
"name": "source",
"type": "source",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"status": {
"name": "status",
"type": "status",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
@@ -560,9 +820,12 @@
"publicId"
]
}
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"label": {
"public.label": {
"name": "label",
"schema": "",
"columns": {
@@ -647,7 +910,7 @@
"columnsTo": [
"id"
],
"onDelete": "no action",
"onDelete": "cascade",
"onUpdate": "no action"
},
"label_importId_import_id_fk": {
@@ -673,9 +936,12 @@
"publicId"
]
}
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"list": {
"public.list": {
"name": "list",
"schema": "",
"columns": {
@@ -785,7 +1051,7 @@
"columnsTo": [
"id"
],
"onDelete": "no action",
"onDelete": "cascade",
"onUpdate": "no action"
},
"list_importId_import_id_fk": {
@@ -811,51 +1077,46 @@
"publicId"
]
}
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"session": {
"name": "session",
"public.workspace_slugs": {
"name": "workspace_slugs",
"schema": "",
"columns": {
"sessionToken": {
"name": "sessionToken",
"slug": {
"name": "slug",
"type": "varchar(255)",
"primaryKey": true,
"notNull": true
},
"userId": {
"name": "userId",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"expires": {
"name": "expires",
"type": "timestamp",
"type": {
"name": "type",
"type": "slug_type",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"session_userId_user_id_fk": {
"name": "session_userId_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"userId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"workspace_slugs_slug_unique": {
"name": "workspace_slugs_slug_unique",
"nullsNotDistinct": false,
"columns": [
"slug"
]
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"user": {
"public.user": {
"name": "user",
"schema": "",
"columns": {
@@ -901,45 +1162,12 @@
"email"
]
}
}
},
"verificationToken": {
"name": "verificationToken",
"schema": "",
"columns": {
"identifier": {
"name": "identifier",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"token": {
"name": "token",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"expires": {
"name": "expires",
"type": "timestamp",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"verificationToken_identifier_token": {
"name": "verificationToken_identifier_token",
"columns": [
"identifier",
"token"
]
}
},
"uniqueConstraints": {}
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"workspace_members": {
"public.workspace_members": {
"name": "workspace_members",
"schema": "",
"columns": {
@@ -992,11 +1220,26 @@
"primaryKey": false,
"notNull": false
},
"deletedBy": {
"name": "deletedBy",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"role": {
"name": "role",
"type": "role",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"status": {
"name": "status",
"type": "member_status",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'invited'"
}
},
"indexes": {},
@@ -1024,6 +1267,19 @@
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"workspace_members_deletedBy_user_id_fk": {
"name": "workspace_members_deletedBy_user_id_fk",
"tableFrom": "workspace_members",
"tableTo": "user",
"columnsFrom": [
"deletedBy"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
@@ -1037,9 +1293,12 @@
"publicId"
]
}
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"workspace": {
"public.workspace": {
"name": "workspace",
"schema": "",
"columns": {
@@ -1144,37 +1403,83 @@
"slug"
]
}
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
}
},
"enums": {
"source": {
"public.card_activity_type": {
"name": "card_activity_type",
"schema": "public",
"values": [
"card.created",
"card.updated.title",
"card.updated.description",
"card.updated.index",
"card.updated.list",
"card.updated.label.added",
"card.updated.label.removed",
"card.updated.member.added",
"card.updated.member.removed",
"card.updated.comment.added",
"card.updated.comment.updated",
"card.updated.comment.deleted",
"card.archived"
]
},
"public.source": {
"name": "source",
"values": {
"trello": "trello"
}
"schema": "public",
"values": [
"trello"
]
},
"status": {
"public.status": {
"name": "status",
"values": {
"started": "started",
"success": "success",
"failed": "failed"
}
"schema": "public",
"values": [
"started",
"success",
"failed"
]
},
"role": {
"public.role": {
"name": "role",
"values": {
"admin": "admin",
"member": "member",
"guest": "guest"
}
"schema": "public",
"values": [
"admin",
"member",
"guest"
]
},
"public.member_status": {
"name": "member_status",
"schema": "public",
"values": [
"invited",
"active",
"removed"
]
},
"public.slug_type": {
"name": "slug_type",
"schema": "public",
"values": [
"reserved",
"premium"
]
}
},
"schemas": {},
"sequences": {},
"roles": {},
"policies": {},
"views": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {},
"columns": {}
"tables": {}
}
}

View File

@@ -1,108 +1,10 @@
{
"version": "5",
"dialect": "pg",
"id": "9ebe8f2d-46c1-43e9-b5ca-4b05e3e37090",
"prevId": "32295e0d-123f-4eae-b323-1fe55e3c4dca",
"id": "dbb6beb4-cd15-47c0-959a-64d161045634",
"prevId": "3bf82a86-d7ff-4ab7-81ed-024350dfb32a",
"version": "7",
"dialect": "postgresql",
"tables": {
"account": {
"name": "account",
"schema": "",
"columns": {
"userId": {
"name": "userId",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"type": {
"name": "type",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"provider": {
"name": "provider",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"providerAccountId": {
"name": "providerAccountId",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"refresh_token": {
"name": "refresh_token",
"type": "text",
"primaryKey": false,
"notNull": false
},
"access_token": {
"name": "access_token",
"type": "text",
"primaryKey": false,
"notNull": false
},
"expires_at": {
"name": "expires_at",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"token_type": {
"name": "token_type",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"scope": {
"name": "scope",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"id_token": {
"name": "id_token",
"type": "text",
"primaryKey": false,
"notNull": false
},
"session_state": {
"name": "session_state",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"account_userId_user_id_fk": {
"name": "account_userId_user_id_fk",
"tableFrom": "account",
"tableTo": "user",
"columnsFrom": [
"userId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"account_provider_providerAccountId": {
"name": "account_provider_providerAccountId",
"columns": [
"provider",
"providerAccountId"
]
}
},
"uniqueConstraints": {}
},
"board": {
"public.board": {
"name": "board",
"schema": "",
"columns": {
@@ -219,7 +121,7 @@
"columnsTo": [
"id"
],
"onDelete": "no action",
"onDelete": "cascade",
"onUpdate": "no action"
}
},
@@ -232,9 +134,241 @@
"publicId"
]
}
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"_card_workspace_members": {
"public.card_activity": {
"name": "card_activity",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "bigserial",
"primaryKey": true,
"notNull": true
},
"publicId": {
"name": "publicId",
"type": "varchar(12)",
"primaryKey": false,
"notNull": true
},
"type": {
"name": "type",
"type": "card_activity_type",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"cardId": {
"name": "cardId",
"type": "bigint",
"primaryKey": false,
"notNull": true
},
"fromIndex": {
"name": "fromIndex",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"toIndex": {
"name": "toIndex",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"fromListId": {
"name": "fromListId",
"type": "bigint",
"primaryKey": false,
"notNull": false
},
"toListId": {
"name": "toListId",
"type": "bigint",
"primaryKey": false,
"notNull": false
},
"labelId": {
"name": "labelId",
"type": "bigint",
"primaryKey": false,
"notNull": false
},
"workspaceMemberId": {
"name": "workspaceMemberId",
"type": "bigint",
"primaryKey": false,
"notNull": false
},
"fromTitle": {
"name": "fromTitle",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"toTitle": {
"name": "toTitle",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"fromDescription": {
"name": "fromDescription",
"type": "text",
"primaryKey": false,
"notNull": false
},
"toDescription": {
"name": "toDescription",
"type": "text",
"primaryKey": false,
"notNull": false
},
"createdBy": {
"name": "createdBy",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"createdAt": {
"name": "createdAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"commentId": {
"name": "commentId",
"type": "bigint",
"primaryKey": false,
"notNull": false
},
"fromComment": {
"name": "fromComment",
"type": "text",
"primaryKey": false,
"notNull": false
},
"toComment": {
"name": "toComment",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"card_activity_cardId_card_id_fk": {
"name": "card_activity_cardId_card_id_fk",
"tableFrom": "card_activity",
"tableTo": "card",
"columnsFrom": [
"cardId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"card_activity_fromListId_list_id_fk": {
"name": "card_activity_fromListId_list_id_fk",
"tableFrom": "card_activity",
"tableTo": "list",
"columnsFrom": [
"fromListId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"card_activity_toListId_list_id_fk": {
"name": "card_activity_toListId_list_id_fk",
"tableFrom": "card_activity",
"tableTo": "list",
"columnsFrom": [
"toListId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"card_activity_labelId_label_id_fk": {
"name": "card_activity_labelId_label_id_fk",
"tableFrom": "card_activity",
"tableTo": "label",
"columnsFrom": [
"labelId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"card_activity_workspaceMemberId_workspace_members_id_fk": {
"name": "card_activity_workspaceMemberId_workspace_members_id_fk",
"tableFrom": "card_activity",
"tableTo": "workspace_members",
"columnsFrom": [
"workspaceMemberId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"card_activity_createdBy_user_id_fk": {
"name": "card_activity_createdBy_user_id_fk",
"tableFrom": "card_activity",
"tableTo": "user",
"columnsFrom": [
"createdBy"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"card_activity_commentId_card_comments_id_fk": {
"name": "card_activity_commentId_card_comments_id_fk",
"tableFrom": "card_activity",
"tableTo": "card_comments",
"columnsFrom": [
"commentId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"card_activity_publicId_unique": {
"name": "card_activity_publicId_unique",
"nullsNotDistinct": false,
"columns": [
"publicId"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public._card_workspace_members": {
"name": "_card_workspace_members",
"schema": "",
"columns": {
@@ -276,22 +410,25 @@
"columnsTo": [
"id"
],
"onDelete": "no action",
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"_card_workspace_members_cardId_workspaceMemberId": {
"name": "_card_workspace_members_cardId_workspaceMemberId",
"_card_workspace_members_cardId_workspaceMemberId_pk": {
"name": "_card_workspace_members_cardId_workspaceMemberId_pk",
"columns": [
"cardId",
"workspaceMemberId"
]
}
},
"uniqueConstraints": {}
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"card": {
"public.card": {
"name": "card",
"schema": "",
"columns": {
@@ -407,7 +544,7 @@
"columnsTo": [
"id"
],
"onDelete": "no action",
"onDelete": "cascade",
"onUpdate": "no action"
},
"card_importId_import_id_fk": {
@@ -433,9 +570,12 @@
"publicId"
]
}
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"_card_labels": {
"public._card_labels": {
"name": "_card_labels",
"schema": "",
"columns": {
@@ -477,22 +617,141 @@
"columnsTo": [
"id"
],
"onDelete": "no action",
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"_card_labels_cardId_labelId": {
"name": "_card_labels_cardId_labelId",
"_card_labels_cardId_labelId_pk": {
"name": "_card_labels_cardId_labelId_pk",
"columns": [
"cardId",
"labelId"
]
}
},
"uniqueConstraints": {}
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"import": {
"public.card_comments": {
"name": "card_comments",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "bigserial",
"primaryKey": true,
"notNull": true
},
"publicId": {
"name": "publicId",
"type": "varchar(12)",
"primaryKey": false,
"notNull": true
},
"comment": {
"name": "comment",
"type": "text",
"primaryKey": false,
"notNull": true
},
"cardId": {
"name": "cardId",
"type": "bigint",
"primaryKey": false,
"notNull": true
},
"createdBy": {
"name": "createdBy",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"createdAt": {
"name": "createdAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updatedAt": {
"name": "updatedAt",
"type": "timestamp",
"primaryKey": false,
"notNull": false
},
"deletedAt": {
"name": "deletedAt",
"type": "timestamp",
"primaryKey": false,
"notNull": false
},
"deletedBy": {
"name": "deletedBy",
"type": "uuid",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"card_comments_cardId_card_id_fk": {
"name": "card_comments_cardId_card_id_fk",
"tableFrom": "card_comments",
"tableTo": "card",
"columnsFrom": [
"cardId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"card_comments_createdBy_user_id_fk": {
"name": "card_comments_createdBy_user_id_fk",
"tableFrom": "card_comments",
"tableTo": "user",
"columnsFrom": [
"createdBy"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"card_comments_deletedBy_user_id_fk": {
"name": "card_comments_deletedBy_user_id_fk",
"tableFrom": "card_comments",
"tableTo": "user",
"columnsFrom": [
"deletedBy"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"card_comments_publicId_unique": {
"name": "card_comments_publicId_unique",
"nullsNotDistinct": false,
"columns": [
"publicId"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.import": {
"name": "import",
"schema": "",
"columns": {
@@ -511,12 +770,14 @@
"source": {
"name": "source",
"type": "source",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"status": {
"name": "status",
"type": "status",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
@@ -559,9 +820,12 @@
"publicId"
]
}
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"label": {
"public.label": {
"name": "label",
"schema": "",
"columns": {
@@ -646,7 +910,7 @@
"columnsTo": [
"id"
],
"onDelete": "no action",
"onDelete": "cascade",
"onUpdate": "no action"
},
"label_importId_import_id_fk": {
@@ -672,9 +936,12 @@
"publicId"
]
}
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"list": {
"public.list": {
"name": "list",
"schema": "",
"columns": {
@@ -784,7 +1051,7 @@
"columnsTo": [
"id"
],
"onDelete": "no action",
"onDelete": "cascade",
"onUpdate": "no action"
},
"list_importId_import_id_fk": {
@@ -810,51 +1077,46 @@
"publicId"
]
}
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"session": {
"name": "session",
"public.workspace_slugs": {
"name": "workspace_slugs",
"schema": "",
"columns": {
"sessionToken": {
"name": "sessionToken",
"slug": {
"name": "slug",
"type": "varchar(255)",
"primaryKey": true,
"notNull": true
},
"userId": {
"name": "userId",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"expires": {
"name": "expires",
"type": "timestamp",
"type": {
"name": "type",
"type": "slug_type",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"session_userId_user_id_fk": {
"name": "session_userId_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"userId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"workspace_slugs_slug_unique": {
"name": "workspace_slugs_slug_unique",
"nullsNotDistinct": false,
"columns": [
"slug"
]
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"user": {
"public.user": {
"name": "user",
"schema": "",
"columns": {
@@ -887,6 +1149,12 @@
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"stripeCustomerId": {
"name": "stripeCustomerId",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
@@ -900,45 +1168,12 @@
"email"
]
}
}
},
"verificationToken": {
"name": "verificationToken",
"schema": "",
"columns": {
"identifier": {
"name": "identifier",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"token": {
"name": "token",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"expires": {
"name": "expires",
"type": "timestamp",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"verificationToken_identifier_token": {
"name": "verificationToken_identifier_token",
"columns": [
"identifier",
"token"
]
}
},
"uniqueConstraints": {}
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"workspace_members": {
"public.workspace_members": {
"name": "workspace_members",
"schema": "",
"columns": {
@@ -991,11 +1226,26 @@
"primaryKey": false,
"notNull": false
},
"deletedBy": {
"name": "deletedBy",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"role": {
"name": "role",
"type": "role",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"status": {
"name": "status",
"type": "member_status",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'invited'"
}
},
"indexes": {},
@@ -1023,6 +1273,19 @@
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"workspace_members_deletedBy_user_id_fk": {
"name": "workspace_members_deletedBy_user_id_fk",
"tableFrom": "workspace_members",
"tableTo": "user",
"columnsFrom": [
"deletedBy"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
@@ -1036,9 +1299,12 @@
"publicId"
]
}
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"workspace": {
"public.workspace": {
"name": "workspace",
"schema": "",
"columns": {
@@ -1143,37 +1409,83 @@
"slug"
]
}
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
}
},
"enums": {
"source": {
"public.card_activity_type": {
"name": "card_activity_type",
"schema": "public",
"values": [
"card.created",
"card.updated.title",
"card.updated.description",
"card.updated.index",
"card.updated.list",
"card.updated.label.added",
"card.updated.label.removed",
"card.updated.member.added",
"card.updated.member.removed",
"card.updated.comment.added",
"card.updated.comment.updated",
"card.updated.comment.deleted",
"card.archived"
]
},
"public.source": {
"name": "source",
"values": {
"trello": "trello"
}
"schema": "public",
"values": [
"trello"
]
},
"status": {
"public.status": {
"name": "status",
"values": {
"started": "started",
"success": "success",
"failed": "failed"
}
"schema": "public",
"values": [
"started",
"success",
"failed"
]
},
"role": {
"public.role": {
"name": "role",
"values": {
"admin": "admin",
"member": "member",
"guest": "guest"
}
"schema": "public",
"values": [
"admin",
"member",
"guest"
]
},
"public.member_status": {
"name": "member_status",
"schema": "public",
"values": [
"invited",
"active",
"removed"
]
},
"public.slug_type": {
"name": "slug_type",
"schema": "public",
"values": [
"reserved",
"premium"
]
}
},
"schemas": {},
"sequences": {},
"roles": {},
"policies": {},
"views": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {},
"columns": {}
"tables": {}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,68 +1,19 @@
{
"version": "12",
"dialect": "pg",
"version": "7",
"dialect": "postgresql",
"entries": [
{
"idx": 0,
"version": "5",
"when": 1711571659259,
"tag": "0000_legal_quicksilver",
"version": "7",
"when": 1735766172233,
"tag": "0000_eager_krista_starr",
"breakpoints": true
},
{
"idx": 1,
"version": "5",
"when": 1713021051974,
"tag": "0001_stale_mattie_franklin",
"breakpoints": true
},
{
"idx": 2,
"version": "5",
"when": 1724967733894,
"tag": "0002_clever_robin_chapel",
"breakpoints": true
},
{
"idx": 3,
"version": "5",
"when": 1728246215706,
"tag": "0003_naive_secret_warriors",
"breakpoints": true
},
{
"idx": 4,
"version": "5",
"when": 1730205607613,
"tag": "0004_rainy_archangel",
"breakpoints": true
},
{
"idx": 5,
"version": "5",
"when": 1730813108528,
"tag": "0005_blue_marvex",
"breakpoints": true
},
{
"idx": 6,
"version": "5",
"when": 1730967400524,
"tag": "0006_neat_korg",
"breakpoints": true
},
{
"idx": 7,
"version": "5",
"when": 1731934769875,
"tag": "0007_adorable_crystal",
"breakpoints": true
},
{
"idx": 8,
"version": "5",
"when": 1731958265600,
"tag": "0008_nasty_bloodstorm",
"version": "7",
"when": 1735821726274,
"tag": "0001_little_red_hulk",
"breakpoints": true
}
]