Last active
September 1, 2015 22:20
-
-
Save RX14/e120e5df66d653807b4e to your computer and use it in GitHub Desktop.
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
| 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