Skip to content

Instantly share code, notes, and snippets.

@adkhare

adkhare/dbschema.sql

Created Jul 15, 2016
Embed
What would you like to do?
CREATE TABLE `user` (
`tenant_id` binary(16) NOT NULL,
`provider_id` binary(16) NOT NULL,
`user_id` binary(16) NOT NULL,
`external_org_unit_id` varchar(128) COLLATE utf8_bin DEFAULT NULL,
`external_user_id` varchar(128) COLLATE utf8_bin NOT NULL,
`external_user_hash` binary(16) NOT NULL,
`display_name` varchar(300) COLLATE utf8_bin DEFAULT NULL,
`last_name` varchar(64) COLLATE utf8_bin DEFAULT NULL,
`first_name` varchar(64) COLLATE utf8_bin DEFAULT NULL,
`better_cloud_user_id` binary(16) NOT NULL,
`sync_ts` bigint(20) unsigned NOT NULL,
`created` timestamp NULL DEFAULT NULL,
`last_modified` timestamp NULL DEFAULT NULL,
`last_login` timestamp NULL DEFAULT NULL,
`raw` text COLLATE utf8_bin,
`user_type` varchar(25) COLLATE utf8_bin DEFAULT NULL,
`active` tinyint(1) NOT NULL DEFAULT '1',
`deleted` tinyint(1) NOT NULL DEFAULT '0',
`primary` tinyint(1) DEFAULT NULL,
`middle_name` varchar(64) COLLATE utf8_bin DEFAULT NULL,
`prefix` varchar(32) COLLATE utf8_bin DEFAULT NULL,
`suffix` varchar(32) COLLATE utf8_bin DEFAULT NULL,
`display_provider_id` binary(16) DEFAULT NULL,
`nickname` varchar(64) COLLATE utf8_bin DEFAULT NULL,
`manager` varchar(128) COLLATE utf8_bin DEFAULT NULL,
`department` varchar(100) COLLATE utf8_bin DEFAULT NULL,
`title` varchar(75) COLLATE utf8_bin DEFAULT NULL,
`locale` varchar(64) COLLATE utf8_bin DEFAULT NULL,
`timezone` varchar(64) COLLATE utf8_bin DEFAULT NULL,
`language` varchar(64) COLLATE utf8_bin DEFAULT NULL,
`admin` tinyint(1) NOT NULL,
PRIMARY KEY (`tenant_id`,`provider_id`,`better_cloud_user_id`,`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment