Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9173529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:36:06+00:00 2026-06-17T16:36:06+00:00

I have this models.py from django.db import models from django.contrib.auth.models import User class Service(models.Model):

  • 0

I have this models.py

from django.db import models
from django.contrib.auth.models import User

class Service(models.Model):
    user = models.ForeignKey(User)
    name = models.CharField(max_length=800, blank=False)
    service = models.CharField(max_length=2000, blank=False)
    def __unicode__(self):
        return self.name

class ServiceCheck(models.Model):
    service = models.ForeignKey(Service)
    check_status = models.CharField(max_length=80)
    check_time = models.DateTimeField()

When i run syncdb against postgresql it ends up with error:

~/dev-md> sudo python manage.py syncdb
Creating tables ...
Creating table monitor_service
Creating table monitor_servicecheck

DatabaseError: Hash/Modulo distribution column does not refer to hash/modulo distribution column in referenced table.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:36:07+00:00Added an answer on June 17, 2026 at 4:36 pm

    Code looks okay upon first glance. I suspect it’s a database related issue.

    As the max_lengths provided are pretty huge, try reducing the max_lengths to something <= 255 or use a TextField instead of a CharField.

    Failing this, try renaming the field service in Service and/or ServiceCheck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following: from django.contrib.auth.models import User class ClientDetails(models.Model): created_by = models.ForeignKey(User) ...
I have following setup. from django.db import models from django.contrib.auth.models import User class Event(models.Model):
I have the following model setup. from django.db import models from django.contrib.auth.models import User
Given this model: from django.db import models from django.contrib.auth.admin import User # Create your
I have a model that looks like this: from django.db import models from django.contrib.auth.models
Currently I have the from django.contrib.auth.models import User but I'm confused as to how
This is my models.py: from tastypie.utils.timezone import now from django.contrib.auth.models import User from django.db
I had a many-to-many relationship between two Django Models: from django.contrib.auth.models import User class
I have a models.py like so: from django.db import models from django.contrib.auth.models import User
I have this setup in my models: class Author(models.Model): name = models.CharField(max_length=100) class Topic(models.Model):

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.