On 1/17/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
>
> On Tuesday 17 Jan 2006 9:04 pm, Bryan Murdock wrote:
> > OK, so as a database dummy, how exactly is this done? Do I pipe
> > the output of 'manage.py sqlreset myapp' to psql, or is there a
> > less drastic way since I know I've only chan
On Tuesday 17 Jan 2006 9:04 pm, Bryan Murdock wrote:
> OK, so as a database dummy, how exactly is this done? Do I pipe
> the output of 'manage.py sqlreset myapp' to psql, or is there a
> less drastic way since I know I've only changed this one thing?
> I don't have any real data in the database
On 1/17/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
>
> On Tuesday 17 Jan 2006 4:45 pm, Julio Nobrega wrote:
> > Restriction *is* on the database too, when you run "manage.py
> > startsql" (the command that outputs the CREATE TABLEs) you can
> > see the UNIQUE being added. But Bryan is updati
On Tuesday 17 Jan 2006 4:45 pm, Julio Nobrega wrote:
> Restriction *is* on the database too, when you run "manage.py
> startsql" (the command that outputs the CREATE TABLEs) you can
> see the UNIQUE being added. But Bryan is updating his model,
> adding the UNIQUE after the table has been create
Restriction *is* on the database too, when you run "manage.py
startsql" (the command that outputs the CREATE TABLEs) you can see the
UNIQUE being added. But Bryan is updating his model, adding the UNIQUE
after the table has been created...
On 1/17/06, Jordi Funollet <[EMAIL PROTECTED]> wrote:
>
On Tuesday 17 Jan 2006 3:53 pm, Jordi Funollet wrote:
> > Afaik Django enforces uniqueness at the application level, but
> > you could always add it to the database:
>
> Ouch. Really? So Django is assuming that we are going to work
> with their database *exclusively* through Django, and doesn't
>
On 1/17/06, Jordi Funollet <[EMAIL PROTECTED]> wrote:
> This restriction should be on database, shouldn't it?
I'd think this would run into compatibility problems with the various
supported backends. For example, SQLite supports UNIQUE, but not
FOREIGN KEY constraints (its official docs say that
Julio Nobrega dixit:
> Afaik Django enforces uniqueness at the application level, but you
> could always add it to the database:
Ouch. Really? So Django is assuming that we are going to work with their
database *exclusively* through Django, and doesn't protect us from doing silly
things to the d
Afaik Django enforces uniqueness at the application level, but you
could always add it to the database:
ALTER TABLE table ADD UNIQUE (slug)
I don't think it's a bad idea at all, it all depends ;)
On 1/16/06, Bryan Murdock <[EMAIL PROTECTED]> wrote:
>
> I think I want my model's SlugField to
I think I want my model's SlugField to be unique (let me know if this
is a Bad Idea for any reason). So I edit my model and change
slug=meta.SlugField() to slug=meta.SlugField(unique=True). Do I need
to do anything to update the database now?
Thanks,
Bryan
10 matches
Mail list logo