Add: armor plates support with new database tables and loadout functionality
fix: only required mods are applied to guns for weight management.
This commit is contained in:
21
migration_add_plates.sql
Normal file
21
migration_add_plates.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
-- Migration: add armor plates support
|
||||
-- Run: sqlite3 tarkov.db < migration_add_plates.sql
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS armor_open_slots (
|
||||
carrier_id TEXT NOT NULL REFERENCES gear_items(id) ON DELETE CASCADE,
|
||||
slot_nameid TEXT NOT NULL,
|
||||
zones TEXT,
|
||||
PRIMARY KEY (carrier_id, slot_nameid)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS armor_slot_plates (
|
||||
carrier_id TEXT NOT NULL,
|
||||
slot_nameid TEXT NOT NULL,
|
||||
plate_id TEXT NOT NULL REFERENCES gear_items(id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (carrier_id, slot_nameid, plate_id),
|
||||
FOREIGN KEY (carrier_id, slot_nameid) REFERENCES armor_open_slots(carrier_id, slot_nameid) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_armor_slot_plates_plate ON armor_slot_plates(plate_id);
|
||||
Reference in New Issue
Block a user