generate
This commit is contained in:
		
							parent
							
								
									f22f5eef4e
								
							
						
					
					
						commit
						72312c7a40
					
				
							
								
								
									
										64
									
								
								web/drizzle/0042_windy_madelyne_pryor.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								web/drizzle/0042_windy_madelyne_pryor.sql
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,64 @@
 | 
				
			|||||||
 | 
					DO $$ BEGIN
 | 
				
			||||||
 | 
					 CREATE TYPE "model_upload_type" AS ENUM('civitai', 'huggingface', 'other');
 | 
				
			||||||
 | 
					EXCEPTION
 | 
				
			||||||
 | 
					 WHEN duplicate_object THEN null;
 | 
				
			||||||
 | 
					END $$;
 | 
				
			||||||
 | 
					--> statement-breakpoint
 | 
				
			||||||
 | 
					DO $$ BEGIN
 | 
				
			||||||
 | 
					 CREATE TYPE "resource_upload" AS ENUM('started', 'success', 'failed');
 | 
				
			||||||
 | 
					EXCEPTION
 | 
				
			||||||
 | 
					 WHEN duplicate_object THEN null;
 | 
				
			||||||
 | 
					END $$;
 | 
				
			||||||
 | 
					--> statement-breakpoint
 | 
				
			||||||
 | 
					CREATE TABLE IF NOT EXISTS "comfyui_deploy"."checkpoints" (
 | 
				
			||||||
 | 
						"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
 | 
				
			||||||
 | 
						"user_id" text,
 | 
				
			||||||
 | 
						"org_id" text,
 | 
				
			||||||
 | 
						"description" text,
 | 
				
			||||||
 | 
						"checkpoint_volume_id" uuid NOT NULL,
 | 
				
			||||||
 | 
						"model_name" text,
 | 
				
			||||||
 | 
						"folder_path" text,
 | 
				
			||||||
 | 
						"civitai_id" text,
 | 
				
			||||||
 | 
						"civitai_version_id" text,
 | 
				
			||||||
 | 
						"civitai_url" text,
 | 
				
			||||||
 | 
						"civitai_download_url" text,
 | 
				
			||||||
 | 
						"civitai_model_response" jsonb,
 | 
				
			||||||
 | 
						"hf_url" text,
 | 
				
			||||||
 | 
						"s3_url" text,
 | 
				
			||||||
 | 
						"client_url" text,
 | 
				
			||||||
 | 
						"is_public" boolean DEFAULT false NOT NULL,
 | 
				
			||||||
 | 
						"status" "resource_upload" DEFAULT 'started' NOT NULL,
 | 
				
			||||||
 | 
						"upload_machine_id" text,
 | 
				
			||||||
 | 
						"upload_type" "model_upload_type" NOT NULL,
 | 
				
			||||||
 | 
						"error_log" text,
 | 
				
			||||||
 | 
						"created_at" timestamp DEFAULT now() NOT NULL,
 | 
				
			||||||
 | 
						"updated_at" timestamp DEFAULT now() NOT NULL
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					--> statement-breakpoint
 | 
				
			||||||
 | 
					CREATE TABLE IF NOT EXISTS "comfyui_deploy"."checkpoint_volume" (
 | 
				
			||||||
 | 
						"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
 | 
				
			||||||
 | 
						"user_id" text,
 | 
				
			||||||
 | 
						"org_id" text,
 | 
				
			||||||
 | 
						"volume_name" text NOT NULL,
 | 
				
			||||||
 | 
						"created_at" timestamp DEFAULT now() NOT NULL,
 | 
				
			||||||
 | 
						"updated_at" timestamp DEFAULT now() NOT NULL,
 | 
				
			||||||
 | 
						"disabled" boolean DEFAULT false NOT NULL
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					--> statement-breakpoint
 | 
				
			||||||
 | 
					DO $$ BEGIN
 | 
				
			||||||
 | 
					 ALTER TABLE "comfyui_deploy"."checkpoints" ADD CONSTRAINT "checkpoints_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "comfyui_deploy"."users"("id") ON DELETE no action ON UPDATE no action;
 | 
				
			||||||
 | 
					EXCEPTION
 | 
				
			||||||
 | 
					 WHEN duplicate_object THEN null;
 | 
				
			||||||
 | 
					END $$;
 | 
				
			||||||
 | 
					--> statement-breakpoint
 | 
				
			||||||
 | 
					DO $$ BEGIN
 | 
				
			||||||
 | 
					 ALTER TABLE "comfyui_deploy"."checkpoints" ADD CONSTRAINT "checkpoints_checkpoint_volume_id_checkpoint_volume_id_fk" FOREIGN KEY ("checkpoint_volume_id") REFERENCES "comfyui_deploy"."checkpoint_volume"("id") ON DELETE cascade ON UPDATE no action;
 | 
				
			||||||
 | 
					EXCEPTION
 | 
				
			||||||
 | 
					 WHEN duplicate_object THEN null;
 | 
				
			||||||
 | 
					END $$;
 | 
				
			||||||
 | 
					--> statement-breakpoint
 | 
				
			||||||
 | 
					DO $$ BEGIN
 | 
				
			||||||
 | 
					 ALTER TABLE "comfyui_deploy"."checkpoint_volume" ADD CONSTRAINT "checkpoint_volume_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "comfyui_deploy"."users"("id") ON DELETE no action ON UPDATE no action;
 | 
				
			||||||
 | 
					EXCEPTION
 | 
				
			||||||
 | 
					 WHEN duplicate_object THEN null;
 | 
				
			||||||
 | 
					END $$;
 | 
				
			||||||
							
								
								
									
										1273
									
								
								web/drizzle/meta/0042_snapshot.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1273
									
								
								web/drizzle/meta/0042_snapshot.json
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -295,6 +295,13 @@
 | 
				
			|||||||
      "when": 1706111421524,
 | 
					      "when": 1706111421524,
 | 
				
			||||||
      "tag": "0041_thick_norrin_radd",
 | 
					      "tag": "0041_thick_norrin_radd",
 | 
				
			||||||
      "breakpoints": true
 | 
					      "breakpoints": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      "idx": 42,
 | 
				
			||||||
 | 
					      "version": "5",
 | 
				
			||||||
 | 
					      "when": 1706164614659,
 | 
				
			||||||
 | 
					      "tag": "0042_windy_madelyne_pryor",
 | 
				
			||||||
 | 
					      "breakpoints": true
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  ]
 | 
					  ]
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user