auto-sync: 2026-04-19 14:30:01
This commit is contained in:
@@ -16,7 +16,7 @@ CREATE TABLE IF NOT EXISTS fr24.captures (
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS fr24.raw_packets (
|
||||
raw_packet_id BIGSERIAL PRIMARY KEY,
|
||||
raw_packet_id BIGINT GENERATED ALWAYS AS IDENTITY,
|
||||
capture_id UUID NOT NULL REFERENCES fr24.captures(capture_id) ON DELETE CASCADE,
|
||||
observed_at TIMESTAMPTZ NOT NULL,
|
||||
partition_date DATE NOT NULL DEFAULT (CURRENT_DATE),
|
||||
@@ -28,7 +28,8 @@ CREATE TABLE IF NOT EXISTS fr24.raw_packets (
|
||||
payload_bytes INTEGER,
|
||||
decoded_format TEXT,
|
||||
message_type TEXT,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
PRIMARY KEY (raw_packet_id, partition_date)
|
||||
) PARTITION BY RANGE (partition_date);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS fr24.raw_packets_default
|
||||
@@ -89,7 +90,8 @@ CREATE TABLE IF NOT EXISTS fr24.track_points (
|
||||
ground_speed_kt NUMERIC(10,2),
|
||||
vertical_rate_fpm NUMERIC(10,2),
|
||||
heading_deg NUMERIC(10,2),
|
||||
source_packet_id BIGINT REFERENCES fr24.raw_packets(raw_packet_id) ON DELETE SET NULL,
|
||||
source_packet_id BIGINT,
|
||||
source_partition_date DATE,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
UNIQUE (track_id, point_order)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user