mirror of
https://github.com/fosrl/pangolin.git
synced 2026-06-11 10:03:35 +00:00
Set the target port from the resource
This commit is contained in:
@@ -274,6 +274,12 @@ export default async function migration() {
|
||||
await db.execute(
|
||||
sql`ALTER TABLE "targets" ADD "mode" text DEFAULT 'http' NOT NULL;`
|
||||
);
|
||||
await db.execute(sql`
|
||||
UPDATE "targets"
|
||||
SET "mode" = "resources"."mode"
|
||||
FROM "resources"
|
||||
WHERE "resources"."resourceId" = "targets"."resourceId";
|
||||
`);
|
||||
await db.execute(sql`ALTER TABLE "targets" ADD "authToken" text;`);
|
||||
|
||||
await db.execute(sql`COMMIT`);
|
||||
|
||||
Reference in New Issue
Block a user