bitlabstudio / django-paypal-express-checkout

A reusable Django app to include a PayPal payment flow to your site.
MIT License
38 stars 19 forks source link

[Migrations][Custom user][Django 1.5] problem with migrations. #5

Closed soujiro86 closed 10 years ago

soujiro86 commented 10 years ago

Hello there, i tried to install the package into an existing project that use the Custom User Model.

I've already set AUTH_USER_MODEL in settings, but when type:

django-admin migrate paypal_express_checkout

i've get:

Running migrations for paypal_express_checkout:
 - Migrating forwards to 0010_auto__add_field_purchaseditem_identifier.
 > paypal_express_checkout:0001_initial
FATAL ERROR - The following SQL query failed: ALTER TABLE "paypal_express_checkout_paymenttransaction" ADD CONSTRAINT "user_id_refs_id_bd829b71" FOREIGN KEY ("user_id") REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED;
The error was: relation "auth_user" does not exist

Error in migration: paypal_express_checkout:0001_initial
DatabaseError: relation "auth_user" does not exist

Maybe those files needs to change auth_user to AUTH_MODEL_USER?

Diego

Tyrdall commented 10 years ago

Hej @magrinidiego, we just added the possibility to add a custom user model, so the old migrations are deprecated. If you just installed this app please just run ./manage.py syncdb --all and then ./manage.py migrate --fake.