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 6102801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:39:22+00:00 2026-05-23T13:39:22+00:00

In my Django app, models.py, I have this field that I have just recently

  • 0

In my Django app, models.py, I have this field that I have just recently added.

 Class Client
     user  = models.ForeignKey(User)

I want to add this field in mysql to an existing table. Problem is I don’t know the command for dealing with foreign keys. The name of my table that I want to add this column is called tiptop_clients.

  • 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-05-23T13:39:23+00:00Added an answer on May 23, 2026 at 1:39 pm

    You could use the sqldiff-command of django-extensions:

    Django command that scans all models
    for the given appnames and compares
    there database schema with the real
    database tables.

    It indicates how columns in the
    database are different from the SQL
    that would be generated by Django.
    This command is not a database
    migration tool. Though it might
    certainly be of help during
    migrations. It’s purpose is to show
    the current differences as a way to
    checking or debugging your models
    compared to the real database tables
    and columns.

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

Sidebar

Related Questions

I have 3 models in my django app class Company(models.Model): name = models.CharField(_(Name), max_length
I have a Django app with a model that contains a field of type
I have a simple django app that is using only the admin. This is
I have a certain class structure in my app, that currently utilizes django for
I have a django project with 2 apps like this: ## tags app, models.py
Am using django forms on my app. I have a model Client like this:
Django newbie here. I have two simple models like this: class Fluff(models.Model): # ....
I have a django app with models as follows: A Question model An Answer
I have the following models in my Django app. How can I from the
Here's part of my Django app's models.py : class Person(models.Model): birth_year = WideYear(null=True, blank=True)

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.