The problem there was that much of the data I was importing came from
the
site's old MySQL database from before I started using PostGIS and
GeoDjango.
Does anyone know if there's a way to tell Postgresql to automatically
detect what's
in the table and resequence?
On Mar 28, 1:17 pm, "Brian Armstr
Yes, of course there is a constraint there: the primary key, which of
course I don't want to remove. Marty's solution was it. Thanks for
the assistance.
On Mar 28, 12:50 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Fri, Mar 28, 2008 at 2:35 PM, makebelieve <[EMAIL PROTECTED]> wrote:
> >
You, my friend, rule. That's exactly what I needed to do. I've just
recently moved
from MySQL and am at the point in which I appreciate Postgresql's
strictness, but
I am still getting used to it.
On Mar 28, 12:57 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote:
> Given that you say you're working
Also, if you have access to the old DB still, consider exporting the
entire thing out again. Make sure that you include the structural
part as well as the data itself. It should export it directly as a
series of SQL statements. A complete dump will provide information
about the sequences.
--~-
Given that you say you're working with PG Navicat, I assume you're
using Postgresql as your database. Postgresql has a concept of
sequences, which it uses to generate IDs for auto-generated fields
like Django's AutoField.
I think what you've done, by copying data in directly, is created
records w
On Fri, Mar 28, 2008 at 2:35 PM, makebelieve <[EMAIL PROTECTED]> wrote:
> I haven't added any unique contraints. It really seems as though
> django doesn't know
> about my existing data. If I obliterate the old data everything works
> fine, but
> that's not a possibility.
At the database l
I haven't added any unique contraints. It really seems as though
django doesn't know
about my existing data. If I obliterate the old data everything works
fine, but
that's not a possibility.
On Mar 28, 12:13 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Fri, Mar 28, 2008 at 2:10 PM, makeb
On Fri, Mar 28, 2008 at 2:10 PM, makebelieve <[EMAIL PROTECTED]> wrote:
> Saving some of my objects work, but only because early IDs have been
> removed
> so it isn't trying to insert an object with an existing ID.
It sounds like you have a unique constraint in the DB that you haven't
told Dja
in PG Navicat to bring in old data I need
>
> Now when I try to create a new object in the admin interface I keep
> getting:
>
> IntegrityError: duplicate key violates unique constraint
> "app_table_pkey"
>
> It's like it doesn't know all those records are th
:
IntegrityError: duplicate key violates unique constraint
"app_table_pkey"
It's like it doesn't know all those records are there and is trying to
save over them.
Can someone please tell me how to fix this?
Thank you.
--~--~-~--~~~---~--~~
You received this
10 matches
Mail list logo