Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ next-env.d.ts
/.vscode/
# Sentry Config File
.env.sentry-build-plugin

docs/
14 changes: 14 additions & 0 deletions src/db/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,17 @@ export enum DropboxClientType {
NAMESPACE_ID = 'namespace_id',
}
export type DropboxClientTypeValue = (typeof DropboxClientType)[keyof typeof DropboxClientType]

export enum PendingAction {
DELETE = 'delete',
CREATE = 'create',
UPDATE = 'update',
}
export type PendingActionValue = (typeof PendingAction)[keyof typeof PendingAction]

export enum PendingActionTarget {
ASSEMBLY = 'assembly',
DROPBOX = 'dropbox',
}
export type PendingActionTargetValue =
(typeof PendingActionTarget)[keyof typeof PendingActionTarget]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CREATE TYPE "public"."pending_action_enum" AS ENUM('delete', 'create', 'update');
CREATE TYPE "public"."pending_action_target_enum" AS ENUM('assembly', 'dropbox');
ALTER TABLE "file_folder_sync" ADD COLUMN "pending_action" "pending_action_enum";
ALTER TABLE "file_folder_sync" ADD COLUMN "pending_action_target" "pending_action_target_enum";
ALTER TABLE "file_folder_sync" ADD COLUMN "pending_action_attempts" integer DEFAULT 0 NOT NULL;
ALTER TABLE "file_folder_sync" ADD COLUMN "pending_action_last_attempt_at" timestamp with time zone;
ALTER TABLE "file_folder_sync" ADD COLUMN "pending_action_last_error" text;
ALTER TABLE "file_folder_sync" ADD CONSTRAINT "file_folder_sync_pending_action_target_consistency" CHECK (("file_folder_sync"."pending_action" IS NULL) = ("file_folder_sync"."pending_action_target" IS NULL));
Loading
Loading