CREATE TABLE IF NOT EXISTS symbol_index_import (
  parent_id INTEGER NOT NULL,
  file_path TEXT NOT NULL,
  local_name TEXT NOT NULL,
  source_name TEXT NOT NULL,
  module_specifier TEXT NOT NULL,
  source_file_path TEXT,
  import_kind TEXT NOT NULL,
  start_line INTEGER NOT NULL,
  start_column INTEGER NOT NULL,
  PRIMARY KEY (parent_id, file_path, local_name, start_line, start_column),
  FOREIGN KEY (parent_id) REFERENCES symbol_index_parent_path(id) ON DELETE CASCADE
);

CREATE INDEX IF NOT EXISTS idx_symbol_index_import_parent_file
  ON symbol_index_import(parent_id, file_path);

CREATE INDEX IF NOT EXISTS idx_symbol_index_import_local_name
  ON symbol_index_import(parent_id, file_path, local_name);
