[p2pu-dev] DB Migrate error?
zuzel.vp
zuzel.vp at gmail.com
Fri Jul 1 15:49:43 UTC 2011
Yesterday I setup a dev environment from scratch and the migrations
worked ok, but I saw a post of someone who had issues with the
migrations: http://jamiecurle.com/posts/local-lernanta-development/
You could do a full setup of the db without running the migrations:
python manage.py syncdb --noinput --all
and fake the part of running the migrations:
python manage.py migrate --all --fake
After trying these new migrations added in the future should work. If
they don't work there is always the option of dropping the dev db and
creating in again with syncdb.
--
Thanks,
Zuzel
On Wed, Jun 29, 2011 at 2:57 PM, Pam Selle <pamela.selle at gmail.com> wrote:
> 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
> _______________________________________________
> p2pu-dev mailing list
> p2pu-dev at lists.p2pu.org
> http://lists.p2pu.org/mailman/listinfo/p2pu-dev
>
More information about the p2pu-dev
mailing list