Created
May 2, 2011 06:46
-
-
Save rotaris/951244 to your computer and use it in GitHub Desktop.
The SQL code generated by the TFS models
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 characters
| BEGIN; | |
| CREATE TABLE "tfsapp_trip" ( | |
| "id" integer NOT NULL PRIMARY KEY, | |
| "name" varchar(100) NOT NULL, | |
| "status" varchar(100) NOT NULL, | |
| "admin_comments_for_traveller" text NOT NULL, | |
| "date_created" datetime NOT NULL, | |
| "date_modified" datetime NOT NULL, | |
| "author_id" integer NOT NULL REFERENCES "auth_user" ("id") | |
| ) | |
| ; | |
| CREATE TABLE "tfsapp_checklist" ( | |
| "id" integer NOT NULL PRIMARY KEY, | |
| "name" varchar(50) NOT NULL | |
| ) | |
| ; | |
| CREATE TABLE "tfsapp_checklistitem" ( | |
| "id" integer NOT NULL PRIMARY KEY, | |
| "trip_id" integer NOT NULL REFERENCES "tfsapp_trip" ("id"), | |
| "author_id" integer NOT NULL REFERENCES "auth_user" ("id"), | |
| "traveller_comments" text NOT NULL, | |
| "admin_comments" text NOT NULL, | |
| "admin_comments_for_traveller" text NOT NULL, | |
| "date_created" datetime NOT NULL, | |
| "date_modified" datetime NOT NULL, | |
| "name" varchar(100) NOT NULL, | |
| "associated_link" varchar(200) NOT NULL, | |
| "description" text NOT NULL, | |
| "status" varchar(150) NOT NULL, | |
| "checklist_id" integer NOT NULL REFERENCES "tfsapp_checklist" ("id") | |
| ) | |
| ; | |
| CREATE TABLE "tfsapp_absenceonduty" ( | |
| "id" integer NOT NULL PRIMARY KEY, | |
| "trip_id" integer NOT NULL REFERENCES "tfsapp_trip" ("id"), | |
| "author_id" integer NOT NULL REFERENCES "auth_user" ("id"), | |
| "traveller_comments" text NOT NULL, | |
| "admin_comments" text NOT NULL, | |
| "admin_comments_for_traveller" text NOT NULL, | |
| "date_created" datetime NOT NULL, | |
| "date_modified" datetime NOT NULL, | |
| "status" varchar(150) NOT NULL, | |
| "start_date" date NOT NULL, | |
| "end_date" date NOT NULL, | |
| "associated_leave_details" text NOT NULL, | |
| "alt_arrangments" text NOT NULL | |
| ) | |
| ; | |
| CREATE TABLE "tfsapp_traveldiary" ( | |
| "id" integer NOT NULL PRIMARY KEY, | |
| "trip_id" integer NOT NULL REFERENCES "tfsapp_trip" ("id"), | |
| "author_id" integer NOT NULL REFERENCES "auth_user" ("id"), | |
| "traveller_comments" text NOT NULL, | |
| "admin_comments" text NOT NULL, | |
| "admin_comments_for_traveller" text NOT NULL, | |
| "date_created" datetime NOT NULL, | |
| "date_modified" datetime NOT NULL, | |
| "status" varchar(150) NOT NULL | |
| ) | |
| ; | |
| CREATE TABLE "tfsapp_traveldiaryentry" ( | |
| "id" integer NOT NULL PRIMARY KEY, | |
| "diary_id" integer NOT NULL REFERENCES "tfsapp_traveldiary" ("id"), | |
| "start_time" datetime NOT NULL, | |
| "end_time" datetime NOT NULL, | |
| "location" varchar(200) NOT NULL, | |
| "activities" text NOT NULL | |
| ) | |
| ; | |
| COMMIT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment