diff --git a/server/sql/tables.sql b/server/sql/tables.sql index 75618d2..abe6c56 100644 --- a/server/sql/tables.sql +++ b/server/sql/tables.sql @@ -13,7 +13,7 @@ CREATE TABLE IF NOT EXISTS lp_ttn_end_device_uplinks ( updated_at_utc TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ); -CREATE UNIQUE INDEX idx_unique_device ON lp_ttn_end_device_uplinks ( +CREATE UNIQUE INDEX IF NOT EXISTS idx_unique_device ON lp_ttn_end_device_uplinks ( device_id, application_ids, dev_eui,