Monday, August 5, 2013

Re: Avoiding huge IDs after deleting data

Two thoughts:
1.  If you are analysing tweets, why are you deleting on a daily basis? Wouldn't a longer term view give you a better picture?
2.  Why not use the status_id field from the tweet as your id? The twitter have the problem of dealing with it's size, and you will (should, or at least could) be getting it in the JSON you download.



On 5 August 2013 23:37, Javier Guerra Giraldez <javier@guerrag.com> wrote:
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.



--
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.
 
 

No comments:

Post a Comment