Skip to content

Instantly share code, notes, and snippets.

@JonasNielsen
Created February 2, 2010 13:10
Show Gist options
  • Save JonasNielsen/292648 to your computer and use it in GitHub Desktop.
Save JonasNielsen/292648 to your computer and use it in GitHub Desktop.
CREATE TABLE "branches" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "address" varchar(255), "city" varchar(255), "zip_code" integer, "created_at" datetime, "updated_at" datetime, "enterprise_id" integer);
CREATE TABLE "enterprises" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime);
CREATE TABLE "people" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "first_name" varchar(255), "last_name" varchar(255), "sex" varchar(255), "age" integer, "email" varchar(255), "created_at" datetime, "updated_at" datetime, "branch_id" integer);
CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL);
CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment