mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat: add fullContext column to rollback table and update related functionality
- Introduced a new "fullContext" JSONB column in the "rollback" table to store additional context for rollbacks. - Removed the "env" column from the "rollback" table to streamline data management. - Updated the rollbacks service to handle the new "fullContext" field during rollback creation. - Adjusted the application service to eliminate environment variable handling in rollback operations.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { relations } from "drizzle-orm";
|
||||
import { pgTable, serial, text } from "drizzle-orm/pg-core";
|
||||
import { jsonb, pgTable, serial, text } from "drizzle-orm/pg-core";
|
||||
import { createInsertSchema } from "drizzle-zod";
|
||||
import { nanoid } from "nanoid";
|
||||
import { z } from "zod";
|
||||
@@ -10,7 +10,6 @@ export const rollbacks = pgTable("rollback", {
|
||||
.notNull()
|
||||
.primaryKey()
|
||||
.$defaultFn(() => nanoid()),
|
||||
env: text("env"),
|
||||
deploymentId: text("deploymentId")
|
||||
.notNull()
|
||||
.references(() => deployments.deploymentId, {
|
||||
@@ -21,6 +20,7 @@ export const rollbacks = pgTable("rollback", {
|
||||
createdAt: text("createdAt")
|
||||
.notNull()
|
||||
.$defaultFn(() => new Date().toISOString()),
|
||||
fullContext: jsonb("fullContext"),
|
||||
});
|
||||
|
||||
export type Rollback = typeof rollbacks.$inferSelect;
|
||||
|
||||
Reference in New Issue
Block a user