| 1922 | } |
| 1923 | |
| 1924 | void CreateRigSensorsTable() const { |
| 1925 | const std::string sql = |
| 1926 | "CREATE TABLE IF NOT EXISTS rig_sensors" |
| 1927 | " (rig_id INTEGER NOT NULL," |
| 1928 | " sensor_id INTEGER NOT NULL," |
| 1929 | " sensor_type INTEGER NOT NULL," |
| 1930 | " sensor_from_rig BLOB," |
| 1931 | "FOREIGN KEY(rig_id) REFERENCES rigs(rig_id) ON DELETE CASCADE);" |
| 1932 | "CREATE UNIQUE INDEX IF NOT EXISTS rig_sensor_assignment ON " |
| 1933 | " rig_sensors(sensor_id, sensor_type);"; |
| 1934 | |
| 1935 | SQLITE3_EXEC(database_, sql.c_str(), nullptr); |
| 1936 | } |
| 1937 | |
| 1938 | void CreateCameraTable() const { |
| 1939 | const std::string sql = |
nothing calls this directly
no outgoing calls
no test coverage detected