Created
January 11, 2013 20:54
-
-
Save vicapow/4513876 to your computer and use it in GitHub Desktop.
This file contains 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
USE ocal; | |
DROP TABLE IF EXISTS openclipart_clipart; | |
-- FILE | |
CREATE TABLE openclipart_clipart( | |
id integer NOT NULL auto_increment, | |
filename varchar(255), | |
owner integer NOT NULL, | |
PRIMARY KEY(id), | |
FOREIGN KEY(owner) REFERENCES openclipart_users(id) | |
); | |
DROP TABLE IF EXISTS openclipart_users; | |
-- USERS | |
CREATE TABLE openclipart_users( | |
id integer NOT NULL auto_increment, | |
username varchar(255) UNIQUE, | |
PRIMARY KEY(id), | |
FOREIGN KEY(avatar) REFERENCES openclipart_clipart(id) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment