Hello.

to summarize the question is

which lines has to be changed when the database file i.e, referenc.db is
deleted and later created manually as empty database?

The problem is that i created whole project a week before.
Later i modified modules, added new tables and new fields (Rrest column was
added for sure in table Areferenc_aref).
I deleted empty database file referenc.db, created new database file
referenc.db manually expecting that new tables will be generated with
additional fields for hem.

Nevertheless the django finds only old columns.

besides i made one check:

1) first of all i totally deleted referenc.db again. For big surprise
command manage.py syncdb runs without mistakes.

Besides python manage.py sql Areferenc  generates tables for non existing
database.

^Cworking:/opt/pages/referenc# python manage.py sql Areferenc

BEGIN;
CREATE TABLE "Areferenc_aref" (
    "id" integer NOT NULL PRIMARY KEY,
    "Rfirstauthor" varchar(500) NOT NULL,
    "Rauthors" varchar(500) NOT NULL,
    "Rjournal" varchar(500) NOT NULL,
    "Rrest" varchar(500) NOT NULL,
    "Rpage" varchar(500) NOT NULL,
    "Rissue" integer NOT NULL,
    "Rvolume" integer NOT NULL,
    "Ryear" integer NOT NULL,
    "Rtitle" varchar(500) NOT NULL,
    "Rkeyw" varchar(500) NOT NULL,
    "Rurl" varchar(200) NOT NULL,
    "Rindex" varchar(500) NOT NULL,
    "Rname" varchar(500) NOT NULL,
    "Rdoi" varchar(500) NOT NULL,
    "Rlink" varchar(100) NOT NULL,
    "Rmail" varchar(75) NOT NULL,
    "Rconcl" text NOT NULL,
    "Rexists" bool NOT NULL,
    "Rinst" varchar(500) NOT NULL
)
;
CREATE TABLE "Areferenc_experimental" (
    "id" integer NOT NULL PRIMARY KEY,
    "Rexp" varchar(500) NOT NULL
)
;
CREATE TABLE "Areferenc_characterization" (
    "id" integer NOT NULL PRIMARY KEY,
    "Rchar" varchar(500) NOT NULL
)
;
CREATE TABLE "Areferenc_devices" (
    "id" integer NOT NULL PRIMARY KEY,
    "Rdev" varchar(500) NOT NULL
)
;
CREATE TABLE "Areferenc_calculations" (
    "id" integer NOT NULL PRIMARY KEY,
    "Rcal" varchar(500) NOT NULL
)
;
CREATE TABLE "Areferenc_afieldorder" (
    "id" integer NOT NULL PRIMARY KEY,
    "Rorder" varchar(500) NOT NULL
)
;
CREATE TABLE "Areferenc_aref_Rexperimental" (
    "id" integer NOT NULL PRIMARY KEY,
    "aref_id" integer NOT NULL REFERENCES "Areferenc_aref" ("id"),
    "experimental_id" integer NOT NULL REFERENCES "Areferenc_experimental"
("id"),
    UNIQUE ("aref_id", "experimental_id")
)
;
CREATE TABLE "Areferenc_aref_Rcharacterization" (
    "id" integer NOT NULL PRIMARY KEY,
    "aref_id" integer NOT NULL REFERENCES "Areferenc_aref" ("id"),
    "characterization_id" integer NOT NULL REFERENCES
"Areferenc_characterization" ("id"),
    UNIQUE ("aref_id", "characterization_id")
)
;
CREATE TABLE "Areferenc_aref_Rdevice" (
    "id" integer NOT NULL PRIMARY KEY,
    "aref_id" integer NOT NULL REFERENCES "Areferenc_aref" ("id"),
    "devices_id" integer NOT NULL REFERENCES "Areferenc_devices" ("id"),
    UNIQUE ("aref_id", "devices_id")
)
;
CREATE TABLE "Areferenc_aref_Rcalculation" (
    "id" integer NOT NULL PRIMARY KEY,
    "aref_id" integer NOT NULL REFERENCES "Areferenc_aref" ("id"),
    "calculations_id" integer NOT NULL REFERENCES "Areferenc_calculations"
("id"),
    UNIQUE ("aref_id", "calculations_id")
)
;
COMMIT

2) Secondly I created referenc.db in  ./referenc manually again.

generated tables with command mentioned in step1 with the same output (table
Areferenc_aref contains column Rrest )

performed manage.py syncdb, which went fluently without mistakes.

executing view i am getting error:
Exception Type: OperationalError  Exception Value:

table Areferenc_aref has no column named Rrest

 Exception Location:
/usr/lib/python2.5/site-packages/django/db/backends/sqlite3/base.py
in execute, line 193
:

  :

regards,
gintare

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to