SQL

CREATE TABLE `slack_installations`  (
  `id` text PRIMARY KEY NOT NULL,
  `team_id` text NOT NULL,
  `team_name` text,
  `org_id` text NOT NULL,
  `bot_token` text NOT NULL,
  `installed_at` text DEFAULT (datetime('now')) NOT NULL,
  FOREIGN KEY (`org_id`) REFERENCES `organizations`(`id`) ON UPDATE no action ON DELETE no action
)

+ Add column

Columns

Column Data type Allow null Primary key Actions
id TEXT Rename | Drop
team_id TEXT Rename | Drop
team_name TEXT Rename | Drop
org_id TEXT Rename | Drop
bot_token TEXT Rename | Drop
installed_at TEXT Rename | Drop

Foreign Keys

Column Destination
org_id organizations.id

+ Add index

Indexes

Name Columns Unique SQL Drop?
slack_installations_team_id_org_id_unique
  • team_id
  • org_id
SQL
CREATE UNIQUE INDEX `slack_installations_team_id_org_id_unique`
ON `slack_installations` (`team_id`,`org_id`)
Drop
sqlite_autoindex_slack_installations_1 id SQL
-- no sql found --
Drop