Skip to content

Instantly share code, notes, and snippets.

@sadaf2605
Created October 1, 2015 08:27
Show Gist options
  • Save sadaf2605/e15c3b9ef045c671a65f to your computer and use it in GitHub Desktop.
Save sadaf2605/e15c3b9ef045c671a65f to your computer and use it in GitHub Desktop.
table items_item has no column named category_id
# $ python manage.py sqlall items
BEGIN;
CREATE TABLE "items_category" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"name" varchar(200) NOT NULL
)
;
CREATE TABLE "items_item" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"name" varchar(200) NOT NULL,
"description" text,
"image" varchar(100) NOT NULL,
"category_id" integer NOT NULL REFERENCES "items_category" ("id"),
"show_in_front_page" bool NOT NULL,
"always_show_in_front_page" bool NOT NULL,
"is_trending" bool NOT NULL
)
;
CREATE INDEX "items_item_6f33f001" ON "items_item" ("category_id");
COMMIT;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment