Ghost

phantomknight287/aero

public
Fork0
CodeIssues0Pull requests1
4branches
aeroapiprismamigrations20251027102517_clean_flight_positions_tablemigration.sql
I AM LOVING THIS APP!!!!7244518a year ago14 lines · 490 B
1/*
2 Warnings:
3
4 - You are about to drop the column `fa_flight_id` on the `flights` table. All the data in the column will be lost.
5
6*/
7-- DropForeignKey
8ALTER TABLE "flight_positions" DROP
9
10-- AlterTable
11ALTER TABLE "flights" DROP COLUMN
12
13-- AddForeignKey
14ALTER TABLE "flight_positions" ADD
CONSTRAINT
"
flight_positions_flight_id_fkey
"
;
"
fa_flight_id
"
;
CONSTRAINT
"
flight_positions_flight_id_fkey
"
FOREIGN KEY
(
"
flight_id
"
)
REFERENCES
"
flight
"
(
"
id
"
)
ON DELETE
SET
NULL
ON UPDATE CASCADE
;