Skip to content

Instantly share code, notes, and snippets.

@rileyrg
Last active June 9, 2017 18:55
Show Gist options
  • Save rileyrg/f61a0871ca1b1db7a1274b41681d8bc2 to your computer and use it in GitHub Desktop.
Save rileyrg/f61a0871ca1b1db7a1274b41681d8bc2 to your computer and use it in GitHub Desktop.
CREATE TABLE `person` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`first_name` varchar(150) DEFAULT NULL,
`surname` varchar(150) DEFAULT NULL,
`stripped_title` varchar(255) DEFAULT NULL,
`is_actor` tinyint(1) DEFAULT NULL,
`sex` int(11) DEFAULT NULL,
`date_of_birth` int(11) DEFAULT NULL,
`date_of_death` int(11) DEFAULT NULL,
`person_type` int(11) DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`height` int(11) DEFAULT NULL,
`bust` int(11) DEFAULT NULL,
`waist` int(11) DEFAULT NULL,
`hips` int(11) DEFAULT NULL,
`dress_size` int(11) DEFAULT NULL,
`shoes` int(11) DEFAULT NULL,
`eye_color_id` int(11) DEFAULT NULL,
`hair_color_id` int(11) DEFAULT NULL,
`nationality_id` int(11) DEFAULT NULL,
`admin_adress_data_id` int(11) DEFAULT NULL,
`area_id` int(11) DEFAULT NULL,
`ethnic_id` int(11) DEFAULT NULL,
`figure_id` int(11) DEFAULT NULL,
`singing_voice_id` int(11) DEFAULT NULL,
`synchron` int(11) DEFAULT NULL,
`synchron_who` varchar(255) DEFAULT NULL,
`is_narrator` int(11) DEFAULT NULL,
`instruments` varchar(255) DEFAULT NULL,
`voice_modulation` varchar(255) DEFAULT NULL,
`genre_singing` varchar(255) DEFAULT NULL,
`educated_singer` int(11) DEFAULT NULL,
`genre_dancing` varchar(255) DEFAULT NULL,
`educated_dancer` int(11) DEFAULT NULL,
`sports` varchar(255) DEFAULT NULL,
`talents` varchar(255) DEFAULT NULL,
`does_advertising` int(11) DEFAULT NULL,
`pending` int(11) DEFAULT NULL,
`alias_first_name` varchar(255) DEFAULT NULL,
`alias_last_name` varchar(255) DEFAULT NULL,
`nationality_code` varchar(2) DEFAULT NULL,
`place_of_birth` varchar(255) DEFAULT NULL,
`place_of_death` varchar(255) DEFAULT NULL,
`international_place_of_birth` varchar(255) DEFAULT NULL,
`wikipedia_url` varchar(255) DEFAULT NULL,
`old_date` int(11) DEFAULT NULL,
`owner_id` int(11) DEFAULT NULL,
`public_viewable` int(11) DEFAULT NULL,
`imdb_name` varchar(255) DEFAULT NULL,
`imdb_link` varchar(45) DEFAULT NULL,
`imdb_id` int(11) DEFAULT NULL,
`extern_video_link` varchar(255) DEFAULT NULL,
`vda_pool_id` int(11) DEFAULT NULL,
`hair_color_parent_id` int(11) DEFAULT NULL,
`adress_data_id` int(11) DEFAULT NULL,
`version` varchar(32) DEFAULT NULL,
`checked` datetime DEFAULT NULL,
`imdb_checked` datetime DEFAULT NULL,
`vda_checked` datetime DEFAULT NULL,
`images_public` int(11) DEFAULT NULL,
`sendBreakdown` tinyint(1) DEFAULT NULL,
`search_sort` int(11) DEFAULT NULL,
`in_process` int(11) DEFAULT NULL,
`web_agency` varchar(255) DEFAULT NULL,
`dob` date DEFAULT NULL,
`dod` date DEFAULT NULL,
`dob_month` tinyint(1) DEFAULT NULL,
`dob_day` tinyint(1) DEFAULT NULL,
`dod_month` tinyint(1) DEFAULT NULL,
`dod_day` tinyint(1) DEFAULT NULL,
`is_casting` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FK_34DCD176151EDCE2` (`adress_data_id`),
KEY `FK_34DCD176C616EAC6` (`admin_adress_data_id`),
KEY `FK_34DCD176BD0F409C` (`area_id`),
KEY `FK_34DCD17676F17274` (`ethnic_id`),
KEY `FK_34DCD1765C011B5` (`figure_id`),
KEY `FK_34DCD1761C9DA55` (`nationality_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1336425 DEFAULT CHARSET=utf8
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nickname` varchar(50) DEFAULT NULL,
`first_name` varchar(255) DEFAULT NULL,
`last_name` varchar(255) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`sha1_password` varchar(40) DEFAULT NULL,
`salt` varchar(32) DEFAULT NULL,
`activation_code` varchar(64) DEFAULT NULL,
`activated` int(11) DEFAULT NULL,
`person_id` int(11) DEFAULT NULL,
`login_hash` varchar(64) DEFAULT NULL,
`current_login` datetime DEFAULT NULL,
`last_login` datetime DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`full_member` int(11) DEFAULT NULL,
`canceled` tinyint(1) DEFAULT NULL,
`adress_data_id` int(11) DEFAULT NULL,
`finished_first_login` int(11) DEFAULT NULL,
`contact` int(11) DEFAULT NULL,
`contact_mail` int(11) DEFAULT NULL,
`contact_mobile` int(11) DEFAULT NULL,
`status` int(11) DEFAULT NULL,
`agency_approved` int(11) DEFAULT NULL,
`bank_name` varchar(255) DEFAULT NULL,
`bank_account` varchar(255) DEFAULT NULL,
`bank_account_holder` varchar(255) DEFAULT NULL,
`bank_code` varchar(255) DEFAULT NULL,
`full_member_since` datetime DEFAULT NULL,
`paid` datetime DEFAULT NULL,
`may_do_casting` int(11) DEFAULT NULL,
`may_see_all_videos` tinyint(1) DEFAULT NULL,
`no_bill` tinyint(1) DEFAULT NULL,
`cancel_casting_message` mediumtext,
`ibac` varchar(45) DEFAULT NULL,
`bic` varchar(45) DEFAULT NULL,
`mandate_ref` varchar(45) DEFAULT NULL,
`creditor_id` varchar(45) DEFAULT NULL,
`may_see_all_pictures` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `user_nickname_index` (`nickname`),
KEY `user_FI_1` (`person_id`),
KEY `user_FI_2` (`adress_data_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7235 DEFAULT CHARSET=utf8
ALTER TABLE person DROP FOREIGN KEY FK_34DCD1767E3C61F9;
ALTER TABLE person ADD CONSTRAINT FK_34DCD1767E3C61F9 FOREIGN KEY (owner_id) REFERENCES user (id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment