SQL

CREATE TABLE `repository`  (
  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  `owner_id` INTEGER NULL,
  `owner_name` TEXT NULL,
  `lower_name` TEXT NOT NULL,
  `name` TEXT NOT NULL,
  `description` TEXT NULL,
  `website` TEXT NULL,
  `original_service_type` INTEGER NULL,
  `original_url` TEXT NULL,
  `default_branch` TEXT NULL,
  `default_wiki_branch` TEXT NULL,
  `num_watches` INTEGER NULL,
  `num_stars` INTEGER NULL,
  `num_forks` INTEGER NULL,
  `num_issues` INTEGER NULL,
  `num_closed_issues` INTEGER NULL,
  `num_pulls` INTEGER NULL,
  `num_closed_pulls` INTEGER NULL,
  `num_milestones` INTEGER DEFAULT 0 NOT NULL,
  `num_closed_milestones` INTEGER DEFAULT 0 NOT NULL,
  `num_projects` INTEGER DEFAULT 0 NOT NULL,
  `num_closed_projects` INTEGER DEFAULT 0 NOT NULL,
  `num_action_runs` INTEGER DEFAULT 0 NOT NULL,
  `num_closed_action_runs` INTEGER DEFAULT 0 NOT NULL,
  `is_private` INTEGER NULL,
  `is_empty` INTEGER NULL,
  `is_archived` INTEGER NULL,
  `is_mirror` INTEGER NULL,
  `status` INTEGER DEFAULT 0 NOT NULL,
  `is_fork` INTEGER DEFAULT 0 NOT NULL,
  `fork_id` INTEGER NULL,
  `is_template` INTEGER DEFAULT 0 NOT NULL,
  `template_id` INTEGER NULL,
  `size` INTEGER DEFAULT 0 NOT NULL,
  `git_size` INTEGER DEFAULT 0 NOT NULL,
  `lfs_size` INTEGER DEFAULT 0 NOT NULL,
  `is_fsck_enabled` INTEGER DEFAULT 1 NOT NULL,
  `close_issues_via_commit_in_any_branch` INTEGER DEFAULT 0 NOT NULL,
  `topics` TEXT NULL,
  `object_format_name` TEXT DEFAULT 'sha1' NOT NULL,
  `trust_model` INTEGER NULL,
  `avatar` TEXT NULL,
  `created_unix` INTEGER NULL,
  `updated_unix` INTEGER NULL,
  `archived_unix` INTEGER DEFAULT 0 NULL,
  push_ips TEXT,
  `auto_sync_deploy` INTEGER DEFAULT 0 NOT NULL
)

+ Add column

Columns

Column Data type Allow null Primary key Actions
id INTEGER Rename | Drop
owner_id INTEGER Rename | Drop
owner_name TEXT Rename | Drop
lower_name TEXT Rename | Drop
name TEXT Rename | Drop
description TEXT Rename | Drop
website TEXT Rename | Drop
original_service_type INTEGER Rename | Drop
original_url TEXT Rename | Drop
default_branch TEXT Rename | Drop
default_wiki_branch TEXT Rename | Drop
num_watches INTEGER Rename | Drop
num_stars INTEGER Rename | Drop
num_forks INTEGER Rename | Drop
num_issues INTEGER Rename | Drop
num_closed_issues INTEGER Rename | Drop
num_pulls INTEGER Rename | Drop
num_closed_pulls INTEGER Rename | Drop
num_milestones INTEGER Rename | Drop
num_closed_milestones INTEGER Rename | Drop
num_projects INTEGER Rename | Drop
num_closed_projects INTEGER Rename | Drop
num_action_runs INTEGER Rename | Drop
num_closed_action_runs INTEGER Rename | Drop
is_private INTEGER Rename | Drop
is_empty INTEGER Rename | Drop
is_archived INTEGER Rename | Drop
is_mirror INTEGER Rename | Drop
status INTEGER Rename | Drop
is_fork INTEGER Rename | Drop
fork_id INTEGER Rename | Drop
is_template INTEGER Rename | Drop
template_id INTEGER Rename | Drop
size INTEGER Rename | Drop
git_size INTEGER Rename | Drop
lfs_size INTEGER Rename | Drop
is_fsck_enabled INTEGER Rename | Drop
close_issues_via_commit_in_any_branch INTEGER Rename | Drop
topics TEXT Rename | Drop
object_format_name TEXT Rename | Drop
trust_model INTEGER Rename | Drop
avatar TEXT Rename | Drop
created_unix INTEGER Rename | Drop
updated_unix INTEGER Rename | Drop
archived_unix INTEGER Rename | Drop
push_ips TEXT Rename | Drop
auto_sync_deploy INTEGER Rename | Drop

+ Add index

Indexes

Name Columns Unique SQL Drop?
IDX_repository_created_unix created_unix SQL
CREATE INDEX `IDX_repository_created_unix`
ON `repository` (`created_unix`)
Drop
IDX_repository_fork_id fork_id SQL
CREATE INDEX `IDX_repository_fork_id`
ON `repository` (`fork_id`)
Drop
IDX_repository_is_archived is_archived SQL
CREATE INDEX `IDX_repository_is_archived`
ON `repository` (`is_archived`)
Drop
IDX_repository_is_empty is_empty SQL
CREATE INDEX `IDX_repository_is_empty`
ON `repository` (`is_empty`)
Drop
IDX_repository_is_fork is_fork SQL
CREATE INDEX `IDX_repository_is_fork`
ON `repository` (`is_fork`)
Drop
IDX_repository_is_mirror is_mirror SQL
CREATE INDEX `IDX_repository_is_mirror`
ON `repository` (`is_mirror`)
Drop
IDX_repository_is_private is_private SQL
CREATE INDEX `IDX_repository_is_private`
ON `repository` (`is_private`)
Drop
IDX_repository_is_template is_template SQL
CREATE INDEX `IDX_repository_is_template`
ON `repository` (`is_template`)
Drop
IDX_repository_lower_name lower_name SQL
CREATE INDEX `IDX_repository_lower_name`
ON `repository` (`lower_name`)
Drop
IDX_repository_name name SQL
CREATE INDEX `IDX_repository_name`
ON `repository` (`name`)
Drop
IDX_repository_original_service_type original_service_type SQL
CREATE INDEX `IDX_repository_original_service_type`
ON `repository` (`original_service_type`)
Drop
IDX_repository_owner_id owner_id SQL
CREATE INDEX `IDX_repository_owner_id`
ON `repository` (`owner_id`)
Drop
IDX_repository_template_id template_id SQL
CREATE INDEX `IDX_repository_template_id`
ON `repository` (`template_id`)
Drop
IDX_repository_updated_unix updated_unix SQL
CREATE INDEX `IDX_repository_updated_unix`
ON `repository` (`updated_unix`)
Drop
UQE_repository_s
  • owner_id
  • lower_name
SQL
CREATE UNIQUE INDEX `UQE_repository_s`
ON `repository` (`owner_id`,`lower_name`)
Drop