SQL

CREATE TABLE voice_agent_widget_connections  (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  voice_agent_config_id INTEGER NOT NULL,
  connection_name TEXT NOT NULL,
  api_key TEXT NOT NULL UNIQUE,
  is_active INTEGER DEFAULT 1,
  created_at TEXT NOT NULL,
  updated_at TEXT,
  FOREIGN KEY (voice_agent_config_id) REFERENCES voice_agent_configs(id) ON DELETE CASCADE
)

+ Add column

Columns

Column Data type Allow null Primary key Actions
id INTEGER Rename | Drop
voice_agent_config_id INTEGER Rename | Drop
connection_name TEXT Rename | Drop
api_key TEXT Rename | Drop
is_active INTEGER Rename | Drop
created_at TEXT Rename | Drop
updated_at TEXT Rename | Drop

Foreign Keys

Column Destination
voice_agent_config_id voice_agent_configs.id

+ Add index

Indexes

Name Columns Unique SQL Drop?
idx_voice_agent_widget_connections_api_key api_key SQL
CREATE INDEX idx_voice_agent_widget_connections_api_key
ON voice_agent_widget_connections(api_key)
Drop
idx_voice_agent_widget_connections_config_id voice_agent_config_id SQL
CREATE INDEX idx_voice_agent_widget_connections_config_id
ON voice_agent_widget_connections(voice_agent_config_id)
Drop
sqlite_autoindex_voice_agent_widget_connections_1 api_key SQL
-- no sql found --
Drop