Skip to content

Instantly share code, notes, and snippets.

@RX14
Last active September 1, 2015 22:20
Show Gist options
  • Select an option

  • Save RX14/e120e5df66d653807b4e to your computer and use it in GitHub Desktop.

Select an option

Save RX14/e120e5df66d653807b4e to your computer and use it in GitHub Desktop.
execute %(
CREATE TABLE "users" (
"id" blob(16) PRIMARY KEY NOT NULL,
"username" varchar(16) UNIQUE
);
).squish
execute %(
CREATE TABLE "content" (
"sha1" blob(20) PRIMARY KEY NOT NULL,
"title" text,
"description" text,
"type" varchar(20),
"user_id" blob(16) NOT NULL,
FOREIGN KEY("user_id") REFERENCES users("id")
);
).squish
add_index :content, :title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment