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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:00:40+00:00 2026-06-13T03:00:40+00:00

I have a blank MySQL database that I’ve just created. south is in my

  • 0

I have a blank MySQL database that I’ve just created. south is in my INSTALLED_APPS.

I run:

$ ./manage.py syncdb
...
Creating table some_app_table

You just installed Django's auth system, which means you don't have any superusers defined.
...
Superuser created successfully.
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Synced:
 > django.contrib.auth
 > django.contrib.contenttypes
...

Not synced (use migrations):
 - myapp
...

$ ./manage.py schemamigration myapp --initial
 + Added model myapp.Model
...
Created 0003_initial.py. You can now apply this migration with: ./manage.py migrate myapp

$ ./manage.py migrate myapp
Running migrations for myapp:
 - Migrating forwards to 0003_initial.
 > skan:0001_initial
 > skan:0002_initial
FATAL ERROR - The following SQL query failed: CREATE TABLE `myapp_model` (`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `user_id` integer NULL, `name` varchar(200) NOT NULL);
The error was: (1050, "Table 'myapp_model' already exists")

What’s going on? Why won’t South initialise correctly?

  • 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-13T03:00:41+00:00Added an answer on June 13, 2026 at 3:00 am

    You already have some migrations defined: initial is (as expected) only needed for the initial migration.

    Your syncdb output says:

    Not synced (use migrations):
     - myapp
    

    Which indicates that south is working as expected. But, then you do:

    $ ./manage.py schemamigration myapp --initial
    + Added model myapp.Model
    ...
    Created 0003_initial.py. You can now apply this migration with: ./manage.py migrate myapp
    

    Notice the 0003-prefix: this (most likely) indicates that there are already migrations defined. This is confirmed by the output of your next command:

    $ ./manage.py migrate myapp
    Running migrations for myapp:
     - Migrating forwards to 0003_initial.
     > skan:0001_initial
     > skan:0002_initial
     <snip>
    

    In other words, you already have a couple of initial migrations, of which at least one will create that table. Your #3 migration tries this again, but fails, because the table of course exists by now.

    What you need to do is only use initial on the creation of your Django app. As soon as the migrations folder contains a file called 0001_initial.py, you don’t need any initial migrations anymore. If you change your table from this point on, call it with auto, and then migrate:

    ./manage.py schemamigration myapp --auto
    ./manage.py migrate myapp
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a MySQL database table that contains an Article ID ( primary key
I have a form that is sending data to a MySQL database and I
I have loaded an associative array of records from a MySQL database table. The
I have a MySQL database of newspaper articles. There's a volume table, an issue
I have a form that searches a MySQL database using PHP. Currently, when a
I have a PHP form that when submitted saves to a MySQL database. One
I'm creating a photo tagging project using mysql and php, that not only just
I have a database that I have created that I use to keep up
I have built a table from a MYSQL database using PHP. There are 4
I have a MySQL database that contains all the words in the standard English

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.