devmason-server icon indicating copy to clipboard operation
devmason-server copied to clipboard

Url CharField too long for MySql

Open mennis opened this issue 15 years ago • 0 comments

Is reducing the max from 500 to 255 a bad idea?

  class Repository(models.Model):
      """
      Representation of a version control system repository.
      """
      project = models.ForeignKey(Project, related_name='repos')
      url = models.CharField(max_length=255, unique=True)
      type = models.CharField('Version Control Type', max_length=20,
                             choices=VCS_TYPES, default=VCS_TYPES[0][0])

      def __unicode__(self):
        return self.url

mennis avatar Aug 10 '10 09:08 mennis