summaryrefslogtreecommitdiff
path: root/db/stoica.sql
diff options
context:
space:
mode:
Diffstat (limited to 'db/stoica.sql')
-rw-r--r--db/stoica.sql12
1 files changed, 12 insertions, 0 deletions
diff --git a/db/stoica.sql b/db/stoica.sql
index 28e8f7662..7ee8f6ff8 100644
--- a/db/stoica.sql
+++ b/db/stoica.sql
@@ -14,6 +14,18 @@ create table profile (
index profile_nickname_idx (nickname)
);
+create table avatar (
+ profile_id integer not null comment 'foreign key to profile table' references profile (id),
+ width integer not null comment 'image width',
+ height integer not null comment 'image height',
+ original boolean default false comment 'uploaded by user or generated?',
+ mediatype varchar(32) not null comment 'file type',
+ url varchar(255) unique key comment 'avatar location',
+
+ constraint primary key (profile_id, width, height),
+ index avatar_profile_id_idx (profile_id),
+);
+
/* local users */
create table user (