Figuring out SQL table creation from django models
I have the the following django model:

    class UserProfile(models.Model):
    	user = models.ForeignKey(User, unique=True)
    	full_name = models.CharField(max_length=100)
    	network = models.ForeignKey(Network)
    	positions = models.ManyToManyField(Position, through ='Timestamp', blank=True)
	    featured_video = models.ForeignKey(VideoInfo, blank=True, null=True)

And in from `SHOW CREATE TABLE userprofile_userprofile`, I get the following MySQL output: 


    | userprofile_userprofile | CREATE TABLE `userprofile_userprofile` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `user_id` int(11) NOT NULL,
      `full_name` varchar(100) NOT NULL,
      `network_id` int(11) NOT NULL,
      `featured_video_id` int(11) DEFAULT NULL,
      `bio` longtext NOT NULL,
      PRIMARY KEY (`id`),
      UNIQUE KEY `user_id` (`user_id`),
      KEY `userprofile_userprofile_fb2a452b` (`network_id`),
      KEY `userprofile_userprofile_58bbe944` (`featured_video_id`),
      CONSTRAINT `featured_video_id_refs_id_b7c2ab56` FOREIGN KEY (`featured_video_id`) REFERENCES `userprofile_videoinfo` (`id`),
      CONSTRAINT `network_id_refs_id_f5c27879` FOREIGN KEY (`network_id`) REFERENCES `network_network` (`id`),
      CONSTRAINT `user_id_refs_id_da7416c6` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
    ) ENGINE=InnoDB AUTO_INCREMENT=31034 DEFAULT CHARSET=latin1 |

Could someone please explain to me what the last seven lines are doing here (`unique key`, `key`, `constraint`, `engine=InnoDB`, and `auto-increment=31034`)? Thank you.

Figuring out SQL table creation from django models
===

I have the the following django model:

    class UserProfile(models.Model):
    	user = models.ForeignKey(User, unique=True)
    	full_name = models.CharField(max_length=100)
    	network = models.ForeignKey(Network)
    	positions = models.ManyToManyField(Position, through ='Timestamp', blank=True)
	    featured_video = models.ForeignKey(VideoInfo, blank=True, null=True)

And in from `SHOW CREATE TABLE userprofile_userprofile`, I get the following MySQL output: 


    | userprofile_userprofile | CREATE TABLE `userprofile_userprofile` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `user_id` int(11) NOT NULL,
      `full_name` varchar(100) NOT NULL,
      `network_id` int(11) NOT NULL,
      `featured_video_id` int(11) DEFAULT NULL,
      `bio` longtext NOT NULL,
      PRIMARY KEY (`id`),
      UNIQUE KEY `user_id` (`user_id`),
      KEY `userprofile_userprofile_fb2a452b` (`network_id`),
      KEY `userprofile_userprofile_58bbe944` (`featured_video_id`),
      CONSTRAINT `featured_video_id_refs_id_b7c2ab56` FOREIGN KEY (`featured_video_id`) REFERENCES `userprofile_videoinfo` (`id`),
      CONSTRAINT `network_id_refs_id_f5c27879` FOREIGN KEY (`network_id`) REFERENCES `network_network` (`id`),
      CONSTRAINT `user_id_refs_id_da7416c6` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
    ) ENGINE=InnoDB AUTO_INCREMENT=31034 DEFAULT CHARSET=latin1 |

Could someone please explain to me what the last seven lines are doing here (`unique key`, `key`, `constraint`, `engine=InnoDB`, and `auto-increment=31034`)? Thank you.
