ifms-pti/server/prisma/migrations/20220614120906_usage_fields/migration.sql

30 lines
1.2 KiB
MySQL
Raw Normal View History

2022-06-14 13:26:01 +00:00
/*
Warnings:
- The `uptime` column on the `AccessPoint` table would be dropped and recreated. This will lead to data loss if there is data in the column.
- The `uptime` column on the `WifiDevice` table would be dropped and recreated. This will lead to data loss if there is data in the column.
- You are about to drop the column `avgSignal` on the `WifiStats` table. All the data in the column will be lost.
- You are about to drop the column `maxSignal` on the `WifiStats` table. All the data in the column will be lost.
- You are about to drop the column `minSignal` on the `WifiStats` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "AccessPoint" ADD COLUMN "usage" BIGINT,
DROP COLUMN "uptime",
ADD COLUMN "uptime" INTEGER;
-- AlterTable
ALTER TABLE "WifiDevice" DROP COLUMN "uptime",
ADD COLUMN "uptime" INTEGER,
ALTER COLUMN "usage" SET DATA TYPE BIGINT;
-- AlterTable
ALTER TABLE "WifiStats" DROP COLUMN "avgSignal",
DROP COLUMN "maxSignal",
DROP COLUMN "minSignal",
ADD COLUMN "avgSignalStrength" INTEGER,
ADD COLUMN "maxSignalStrength" INTEGER,
ADD COLUMN "minSignalStrength" INTEGER,
ALTER COLUMN "avgUsage" SET DATA TYPE BIGINT,
ALTER COLUMN "sumUsage" SET DATA TYPE BIGINT;