Skip to content

Instantly share code, notes, and snippets.

@ovnicraft
Created March 5, 2014 17:44
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 ovnicraft/9372390 to your computer and use it in GitHub Desktop.
Save ovnicraft/9372390 to your computer and use it in GitHub Desktop.
CREATE TABLE `auth_userprofile` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`user_id` integer NOT NULL UNIQUE,
`name` varchar(255) NOT NULL,
`meta` longtext NOT NULL,
`courseware` varchar(255) NOT NULL,
`language` varchar(255) NOT NULL,
`location` varchar(255) NOT NULL,
`year_of_birth` integer,
`gender` varchar(6),
`level_of_education` varchar(6),
`mailing_address` longtext,
`country` varchar(2),
`goals` longtext,
`allow_certificate` bool NOT NULL,
`cedula` varchar(32),
`city_id` integer
)
;
ALTER TABLE `auth_userprofile` ADD CONSTRAINT `user_id_refs_id_628b4c11` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
ALTER TABLE `auth_userprofile` ADD CONSTRAINT `city_id_refs_id_8516bb16` FOREIGN KEY (`city_id`) REFERENCES `cities_city` (`id`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment