SQL

CREATE TABLE `repo_license`  (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  `repo_id` INTEGER NOT NULL,
  `commit_id` TEXT NULL,
  `license` TEXT NOT NULL,
  `created_unix` INTEGER NULL,
  `updated_unix` INTEGER NULL
)

+ Add column

Columns

Column Data type Allow null Primary key Actions
id INTEGER Rename | Drop
repo_id INTEGER Rename | Drop
commit_id TEXT Rename | Drop
license TEXT Rename | Drop
created_unix INTEGER Rename | Drop
updated_unix INTEGER Rename | Drop

+ Add index

Indexes

Name Columns Unique SQL Drop?
IDX_repo_license_created_unix created_unix SQL
CREATE INDEX `IDX_repo_license_created_unix`
ON `repo_license` (`created_unix`)
Drop
IDX_repo_license_updated_unix updated_unix SQL
CREATE INDEX `IDX_repo_license_updated_unix`
ON `repo_license` (`updated_unix`)
Drop
UQE_repo_license_s
  • repo_id
  • license
SQL
CREATE UNIQUE INDEX `UQE_repo_license_s`
ON `repo_license` (`repo_id`,`license`)
Drop