SQL

CREATE TABLE `bitbucket_credentials`  (
  `id` text PRIMARY KEY NOT NULL,
  `org_id` text NOT NULL,
  `access_token` text NOT NULL,
  `refresh_token` text NOT NULL,
  `expires_at` text NOT NULL,
  `created_at` text DEFAULT (datetime('now')) NOT NULL,
  `updated_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
org_id TEXT Rename | Drop
access_token TEXT Rename | Drop
refresh_token TEXT Rename | Drop
expires_at TEXT Rename | Drop
created_at TEXT Rename | Drop
updated_at TEXT Rename | Drop

Foreign Keys

Column Destination
org_id organizations.id

+ Add index

Indexes

Name Columns Unique SQL Drop?
bitbucket_credentials_org_id_unique org_id SQL
CREATE UNIQUE INDEX `bitbucket_credentials_org_id_unique`
ON `bitbucket_credentials` (`org_id`)
Drop
sqlite_autoindex_bitbucket_credentials_1 id SQL
-- no sql found --
Drop