[p2pu-dev] DB Migrate error?

Pam Selle pamela.selle at gmail.com
Wed Jun 29 18:57:11 UTC 2011


I've been trying to setup the lernanta environment to start 
contributing, and now my major sticking point seems to be a DB error ...

Looks like this after running "python manage.py syncdb --noinput --migrate":
db.delete_unique('projects_link', ['project_id', 'url'])
   File 
"/Users/pam/.virtualenvs/lernanta/lib/python2.6/site-packages/south/db/generic.py", 
line 479, in delete_unique
     raise ValueError("Cannot find a UNIQUE constraint on table %s, 
columns %r" % (table_name, columns))
ValueError: Cannot find a UNIQUE constraint on table projects_link, 
columns ['project_id', 'url']

And then further down (up?) some notes were found:

  ! Error found during real run of migration! Aborting.

  ! Since you have a database that does not support running
  ! schema-altering statements in transactions, we have had
  ! to leave it in an interim state between migrations.

! You *might* be able to recover with:   = CREATE TABLE `projects_link` 
(`feed_url` varchar(200) NOT NULL DEFAULT '', `title` varchar(250) NOT 
NULL, `url` varchar(200) NOT NULL, `project_id` integer NOT NULL, 
`created_on` datetime NOT NULL DEFAULT '2010-12-18', `id` integer 
AUTO_INCREMENT NOT NULL PRIMARY KEY); []
    = ALTER TABLE `projects_link` ADD CONSTRAINT 
`projects_link_project_id_7299fef8c0d81873_uniq` UNIQUE (`project_id`, 
`url`) []
    = ALTER TABLE `projects_project` ADD COLUMN `description` longtext 
NOT NULL; []
    = ALTER TABLE `projects_project` ADD COLUMN `call_to_action` 
longtext NOT NULL; []
    = ALTER TABLE `projects_project` ADD COLUMN `template` longtext NOT 
NULL; []
    = ALTER TABLE `projects_project` ADD COLUMN `css` longtext NOT NULL; []
    = ALTER TABLE `projects_project` DROP COLUMN `short_description` 
CASCADE; []
    = ALTER TABLE `projects_project` DROP COLUMN `long_description` 
CASCADE; []
    = ALTER TABLE `projects_project` DROP COLUMN `detailed_description` 
CASCADE; []

  ! The South developers regret this has happened, and would
  ! like to gently persuade you to consider a slightly
  ! easier-to-deal-with DBMS.
  ! NOTE: The error which caused the migration to fail is further up.

----
I tried these instructions, and reran the command and still got the error.

Has anyone found a solution to this? Or anyone working with the current 
db dev version and it's just fine?

Just trying to get involved!

-- Pam


More information about the p2pu-dev mailing list