mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: remove limitRollback from application settings and related UI components
- Eliminated the "limitRollback" property from the application schema and the ShowRollbackSettings component, streamlining rollback configuration. - Updated the database schema to drop the "limitRollback" column from the "application" table, ensuring consistency across the application.
This commit is contained in:
@@ -14,9 +14,7 @@ import {
|
||||
FormField,
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from "@/components/ui/form";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Switch } from "@/components/ui/switch";
|
||||
import { api } from "@/utils/api";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
@@ -55,7 +53,6 @@ export const ShowRollbackSettings = ({ applicationId, children }: Props) => {
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
rollbackActive: application?.rollbackActive ?? false,
|
||||
limitRollback: application?.limitRollback ?? 5,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -63,7 +60,6 @@ export const ShowRollbackSettings = ({ applicationId, children }: Props) => {
|
||||
await updateApplication({
|
||||
applicationId,
|
||||
rollbackActive: data.rollbackActive,
|
||||
limitRollback: data.limitRollback,
|
||||
})
|
||||
.then(() => {
|
||||
toast.success("Rollback settings updated");
|
||||
@@ -111,27 +107,6 @@ export const ShowRollbackSettings = ({ applicationId, children }: Props) => {
|
||||
)}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="limitRollback"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>Maximum Rollbacks</FormLabel>
|
||||
<FormControl>
|
||||
<Input
|
||||
type="number"
|
||||
{...field}
|
||||
onChange={(e) => field.onChange(Number(e.target.value))}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormDescription>
|
||||
Number of rollback points to maintain (1-50)
|
||||
</FormDescription>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
|
||||
<Button type="submit" className="w-full" isLoading={isLoading}>
|
||||
Save Settings
|
||||
</Button>
|
||||
|
||||
1
apps/dokploy/drizzle/0095_sweet_venom.sql
Normal file
1
apps/dokploy/drizzle/0095_sweet_venom.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE "application" DROP COLUMN "limitRollback";
|
||||
5806
apps/dokploy/drizzle/meta/0095_snapshot.json
Normal file
5806
apps/dokploy/drizzle/meta/0095_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -666,6 +666,13 @@
|
||||
"when": 1748918922255,
|
||||
"tag": "0094_true_marvel_zombies",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 95,
|
||||
"version": "7",
|
||||
"when": 1748931222940,
|
||||
"tag": "0095_sweet_venom",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -132,7 +132,6 @@ export const applications = pgTable("application", {
|
||||
false,
|
||||
),
|
||||
rollbackActive: boolean("rollbackActive").default(false),
|
||||
limitRollback: integer("limitRollback").default(5),
|
||||
buildArgs: text("buildArgs"),
|
||||
memoryReservation: text("memoryReservation"),
|
||||
memoryLimit: text("memoryLimit"),
|
||||
|
||||
Reference in New Issue
Block a user