Monday, August 5, 2013

Re: Avoiding huge IDs after deleting data

On Mon, Aug 5, 2013 at 4:52 PM, Sean Whalen <whalenster@gmail.com> wrote:
> How can the models be configured to use bigserial? I know I could convert
> the tables myself, but that is not helpful for distributing the app.

https://docs.djangoproject.com/en/1.5/ref/django-admin/#sqlcustom-appname-appname

you can provide custom SQL commands that are executed right after
table creation by syncdb. in short, just add
"<appname>/sql/<modelname>.sql" or
"<appname>/sql/<modelname>.<dbbackend>.sql" files.


i guess South also provides some way to express the same change as a migration.

--
Javier

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate