IT als land hinzugefügt
This commit is contained in:
@@ -9,8 +9,9 @@ const router: Router = Router();
|
|||||||
router.use("/mail", mailRouter);
|
router.use("/mail", mailRouter);
|
||||||
router.use("/event", eventRouter);
|
router.use("/event", eventRouter);
|
||||||
router.get("/import", (req, res) => {
|
router.get("/import", (req, res) => {
|
||||||
DATA.forEach((station) => {
|
DATA.forEach(async (station) => {
|
||||||
prisma.station.create({
|
try {
|
||||||
|
await prisma.station.create({
|
||||||
data: {
|
data: {
|
||||||
aircraftRegistration: "D-H",
|
aircraftRegistration: "D-H",
|
||||||
aircraft: station.aircraft,
|
aircraft: station.aircraft,
|
||||||
@@ -35,6 +36,9 @@ router.get("/import", (req, res) => {
|
|||||||
longitude: station.longitude,
|
longitude: station.longitude,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
} catch (error) {
|
||||||
|
console.error(`Error creating station ${station.aircraft}:`, error);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
-- AlterEnum
|
||||||
|
-- This migration adds more than one value to an enum.
|
||||||
|
-- With PostgreSQL versions 11 and earlier, this is not possible
|
||||||
|
-- in a single migration. This can be worked around by creating
|
||||||
|
-- multiple migrations, each migration adding only one value to
|
||||||
|
-- the enum.
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TYPE "Country" ADD VALUE 'NL';
|
||||||
|
ALTER TYPE "Country" ADD VALUE 'LU';
|
||||||
|
ALTER TYPE "Country" ADD VALUE 'LI';
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
-- AlterEnum
|
||||||
|
ALTER TYPE "Country" ADD VALUE 'IT';
|
||||||
@@ -11,6 +11,7 @@ enum Country {
|
|||||||
NL
|
NL
|
||||||
LU
|
LU
|
||||||
LI
|
LI
|
||||||
|
IT
|
||||||
}
|
}
|
||||||
|
|
||||||
model Station {
|
model Station {
|
||||||
|
|||||||
Reference in New Issue
Block a user