mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Refactor backup management and enhance database schema
- Updated the ShowBackups component to improve layout and user experience by adding a minimum height and centering content when no backups are available. - Removed the outdated SQL file `0089_dazzling_marrow.sql` and replaced it with a new schema file `0089_eminent_winter_soldier.sql` that introduces new columns and types for the `backup` table, enhancing data structure. - Updated the journal and snapshot metadata to reflect the new schema changes and maintain consistency in the database structure. - Adjusted the service component layout to accommodate new grid configurations for better responsiveness.
This commit is contained in:
@@ -1 +0,0 @@
|
||||
ALTER TABLE "backup" ADD COLUMN "metadata" jsonb;
|
||||
@@ -2,4 +2,5 @@ CREATE TYPE "public"."backupType" AS ENUM('database', 'compose');--> statement-b
|
||||
ALTER TABLE "backup" ADD COLUMN "serviceName" text;--> statement-breakpoint
|
||||
ALTER TABLE "backup" ADD COLUMN "backupType" "backupType" DEFAULT 'database' NOT NULL;--> statement-breakpoint
|
||||
ALTER TABLE "backup" ADD COLUMN "composeId" text;--> statement-breakpoint
|
||||
ALTER TABLE "backup" ADD COLUMN "metadata" jsonb;--> statement-breakpoint
|
||||
ALTER TABLE "backup" ADD CONSTRAINT "backup_composeId_compose_composeId_fk" FOREIGN KEY ("composeId") REFERENCES "public"."compose"("composeId") ON DELETE cascade ON UPDATE no action;
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"id": "83185289-c593-420c-b8da-a90143aebf8b",
|
||||
"prevId": "7fea81ef-e2a7-4a8b-b755-e98903a08b57",
|
||||
"id": "12ebb86a-87e3-4023-a64d-0c5df96507fb",
|
||||
"prevId": "c7eae4ce-5acc-439b-962f-bb2ef8922187",
|
||||
"version": "7",
|
||||
"dialect": "postgresql",
|
||||
"tables": {
|
||||
@@ -2107,11 +2107,29 @@
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"startedAt": {
|
||||
"name": "startedAt",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"finishedAt": {
|
||||
"name": "finishedAt",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"errorMessage": {
|
||||
"name": "errorMessage",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"scheduleId": {
|
||||
"name": "scheduleId",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
}
|
||||
},
|
||||
"indexes": {},
|
||||
@@ -2167,6 +2185,19 @@
|
||||
],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
"deployment_scheduleId_schedule_scheduleId_fk": {
|
||||
"name": "deployment_scheduleId_schedule_scheduleId_fk",
|
||||
"tableFrom": "deployment",
|
||||
"tableTo": "schedule",
|
||||
"columnsFrom": [
|
||||
"scheduleId"
|
||||
],
|
||||
"columnsTo": [
|
||||
"scheduleId"
|
||||
],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
},
|
||||
"compositePrimaryKeys": {},
|
||||
@@ -5261,6 +5292,167 @@
|
||||
"policies": {},
|
||||
"checkConstraints": {},
|
||||
"isRLSEnabled": false
|
||||
},
|
||||
"public.schedule": {
|
||||
"name": "schedule",
|
||||
"schema": "",
|
||||
"columns": {
|
||||
"scheduleId": {
|
||||
"name": "scheduleId",
|
||||
"type": "text",
|
||||
"primaryKey": true,
|
||||
"notNull": true
|
||||
},
|
||||
"name": {
|
||||
"name": "name",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"cronExpression": {
|
||||
"name": "cronExpression",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"appName": {
|
||||
"name": "appName",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"serviceName": {
|
||||
"name": "serviceName",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"shellType": {
|
||||
"name": "shellType",
|
||||
"type": "shellType",
|
||||
"typeSchema": "public",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": "'bash'"
|
||||
},
|
||||
"scheduleType": {
|
||||
"name": "scheduleType",
|
||||
"type": "scheduleType",
|
||||
"typeSchema": "public",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": "'application'"
|
||||
},
|
||||
"command": {
|
||||
"name": "command",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"script": {
|
||||
"name": "script",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"applicationId": {
|
||||
"name": "applicationId",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"composeId": {
|
||||
"name": "composeId",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"serverId": {
|
||||
"name": "serverId",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"userId": {
|
||||
"name": "userId",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
"enabled": {
|
||||
"name": "enabled",
|
||||
"type": "boolean",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"default": true
|
||||
},
|
||||
"createdAt": {
|
||||
"name": "createdAt",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
}
|
||||
},
|
||||
"indexes": {},
|
||||
"foreignKeys": {
|
||||
"schedule_applicationId_application_applicationId_fk": {
|
||||
"name": "schedule_applicationId_application_applicationId_fk",
|
||||
"tableFrom": "schedule",
|
||||
"tableTo": "application",
|
||||
"columnsFrom": [
|
||||
"applicationId"
|
||||
],
|
||||
"columnsTo": [
|
||||
"applicationId"
|
||||
],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
"schedule_composeId_compose_composeId_fk": {
|
||||
"name": "schedule_composeId_compose_composeId_fk",
|
||||
"tableFrom": "schedule",
|
||||
"tableTo": "compose",
|
||||
"columnsFrom": [
|
||||
"composeId"
|
||||
],
|
||||
"columnsTo": [
|
||||
"composeId"
|
||||
],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
"schedule_serverId_server_serverId_fk": {
|
||||
"name": "schedule_serverId_server_serverId_fk",
|
||||
"tableFrom": "schedule",
|
||||
"tableTo": "server",
|
||||
"columnsFrom": [
|
||||
"serverId"
|
||||
],
|
||||
"columnsTo": [
|
||||
"serverId"
|
||||
],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
"schedule_userId_user_temp_id_fk": {
|
||||
"name": "schedule_userId_user_temp_id_fk",
|
||||
"tableFrom": "schedule",
|
||||
"tableTo": "user_temp",
|
||||
"columnsFrom": [
|
||||
"userId"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {},
|
||||
"policies": {},
|
||||
"checkConstraints": {},
|
||||
"isRLSEnabled": false
|
||||
}
|
||||
},
|
||||
"enums": {
|
||||
@@ -5439,6 +5631,24 @@
|
||||
"active",
|
||||
"inactive"
|
||||
]
|
||||
},
|
||||
"public.scheduleType": {
|
||||
"name": "scheduleType",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"application",
|
||||
"compose",
|
||||
"server",
|
||||
"dokploy-server"
|
||||
]
|
||||
},
|
||||
"public.shellType": {
|
||||
"name": "shellType",
|
||||
"schema": "public",
|
||||
"values": [
|
||||
"bash",
|
||||
"sh"
|
||||
]
|
||||
}
|
||||
},
|
||||
"schemas": {},
|
||||
|
||||
@@ -624,6 +624,13 @@
|
||||
"when": 1746256928101,
|
||||
"tag": "0088_illegal_ma_gnuci",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 89,
|
||||
"version": "7",
|
||||
"when": 1746287354535,
|
||||
"tag": "0089_eminent_winter_soldier",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user