Skip to content

Instantly share code, notes, and snippets.

@adelowo

adelowo/dump.sql Secret

Created June 23, 2018 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adelowo/4de408f0b272a4e746b0a2678e7de411 to your computer and use it in GitHub Desktop.
Save adelowo/4de408f0b272a4e746b0a2678e7de411 to your computer and use it in GitHub Desktop.
Sql dump sample
DROP TABLE IF EXISTS `access`;
CREATE TABLE `access` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) DEFAULT NULL,
`repo_id` bigint(20) DEFAULT NULL,
`mode` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UQE_access_s` (`user_id`,`repo_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `access_token`;
CREATE TABLE `access_token` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`uid` bigint(20) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`sha1` varchar(40) DEFAULT NULL,
`created_unix` bigint(20) DEFAULT NULL,
`updated_unix` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UQE_access_token_sha1` (`sha1`),
KEY `IDX_access_token_updated_unix` (`updated_unix`),
KEY `IDX_access_token_uid` (`uid`),
KEY `IDX_access_token_created_unix` (`created_unix`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `action`;
CREATE TABLE `action` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) DEFAULT NULL,
`op_type` int(11) DEFAULT NULL,
`act_user_id` bigint(20) DEFAULT NULL,
`repo_id` bigint(20) DEFAULT NULL,
`comment_id` bigint(20) DEFAULT NULL,
`is_deleted` tinyint(1) NOT NULL DEFAULT '0',
`ref_name` varchar(255) DEFAULT NULL,
`is_private` tinyint(1) NOT NULL DEFAULT '0',
`content` text,
`created_unix` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `IDX_action_comment_id` (`comment_id`),
KEY `IDX_action_is_deleted` (`is_deleted`),
KEY `IDX_action_is_private` (`is_private`),
KEY `IDX_action_created_unix` (`created_unix`),
KEY `IDX_action_user_id` (`user_id`),
KEY `IDX_action_act_user_id` (`act_user_id`),
KEY `IDX_action_repo_id` (`repo_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment