>> And a slightly problematic part is sqlite, which doesn't allow you
>> to ALTER tables (or at least not adding a column to a table); I
>> use sqlite mainly for testing & developing, recreating it every
>> time one of my model changes (the thing there that I found the
>> most hassle is entering an admin login, email & pass; I cannot
>> script that...).
>
> It doesn't?
My bad; I knew there are some restrictions on altering tables, but
picked the wrong one. It's dropping columns (a.o.) that apparently
cannot be done.
> sqlite> .schema products_product
> CREATE TABLE "products_product" (
> "id" integer NOT NULL PRIMARY KEY,
> "code" varchar(32) NOT NULL UNIQUE,
> "product_line_id" integer NOT NULL,
> "name" varchar(128) NOT NULL,
> "charging_cycle" varchar(16) NOT NULL,
> "price" decimal NOT NULL,
> "active" bool NOT NULL,
> "active_from" datetime NULL,
> "active_to" datetime NULL
> );
> CREATE INDEX "products_product_product_line_id" ON
> "products_product" ("product_line_id");
> sqlite> alter table products_product add column responsible_staff
> integer;
> sqlite> .schema products_product
> CREATE TABLE "products_product" (
> "id" integer NOT NULL PRIMARY KEY,
> "code" varchar(32) NOT NULL UNIQUE,
> "product_line_id" integer NOT NULL,
> "name" varchar(128) NOT NULL,
> "charging_cycle" varchar(16) NOT NULL,
> "price" decimal NOT NULL,
> "active" bool NOT NULL,
> "active_from" datetime NULL,
> "active_to" datetime NULL
> , responsible_staff integer);
> CREATE INDEX "products_product_product_line_id" ON
> "products_product" ("product_line_id");
>
>
>
> --
>
> Darryl Ross
> Director
> AFOYI, "Information Technology Solutions"
> p 08 7127 1831
> m 0400 206 443
> f 08 8425 9607
> e [EMAIL PROTECTED]
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---