feat: add replica sets migration

This commit is contained in:
Mauricio Siu
2024-12-25 03:24:18 -06:00
parent 4065ad4428
commit 8f76d520c8
5 changed files with 4275 additions and 7 deletions

View File

@@ -18,6 +18,7 @@ import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
import {
Form,
FormControl,
FormDescription,
FormField,
FormItem,
FormLabel,
@@ -550,13 +551,14 @@ export const AddDatabase = ({ projectId, projectName }: Props) => {
name="replicaSets"
render={({ field }) => {
return (
<FormItem>
<FormLabel>Use Replica Sets</FormLabel>
<FormItem className="flex flex-row items-center justify-between p-3 mt-4 border rounded-lg shadow-sm">
<div className="space-y-0.5">
<FormLabel>Use Replica Sets</FormLabel>
</div>
<FormControl>
<Switch
checked={field.value}
onCheckedChange={field.onChange}
aria-readonly
/>
</FormControl>

View File

@@ -0,0 +1 @@
ALTER TABLE "mongo" ADD COLUMN "replicaSets" boolean DEFAULT false;

File diff suppressed because it is too large Load Diff

View File

@@ -365,6 +365,13 @@
"when": 1734241482851,
"tag": "0051_hard_gorgon",
"breakpoints": true
},
{
"idx": 52,
"version": "6",
"when": 1735116913467,
"tag": "0052_short_thunderbolt_ross",
"breakpoints": true
}
]
}