Created
October 1, 2015 08:27
-
-
Save sadaf2605/e15c3b9ef045c671a65f to your computer and use it in GitHub Desktop.
Revisions
-
sadaf2605 created this gist
Oct 1, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ # $ 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;