try fix uid unique error
This commit is contained in:
@@ -234,6 +234,8 @@ class DatabasePool:
|
||||
ADD COLUMN IF NOT EXISTS capture_observations JSONB
|
||||
"""
|
||||
)
|
||||
await conn.execute("DROP INDEX IF EXISTS idx_packets_packet_uid")
|
||||
await conn.execute("CREATE INDEX IF NOT EXISTS idx_packets_packet_uid ON packets(packet_uid)")
|
||||
logger.info("DB pool initialized")
|
||||
except Exception:
|
||||
logger.exception("Failed to create DB pool")
|
||||
|
||||
@@ -102,7 +102,8 @@ CREATE TABLE IF NOT EXISTS packets (
|
||||
);
|
||||
ALTER TABLE packets ADD COLUMN IF NOT EXISTS capture_observations JSONB;
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS idx_packets_correlation_key ON packets(correlation_key);
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS idx_packets_packet_uid ON packets(packet_uid);
|
||||
DROP INDEX IF EXISTS idx_packets_packet_uid;
|
||||
CREATE INDEX IF NOT EXISTS idx_packets_packet_uid ON packets(packet_uid);
|
||||
CREATE INDEX IF NOT EXISTS idx_packets_flow_id ON packets(flow_id);
|
||||
EOF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user