summaryrefslogtreecommitdiff
path: root/db/laconica.sql
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlezvous.ca>2008-06-22 12:16:07 -0400
committerEvan Prodromou <evan@controlezvous.ca>2008-06-22 12:16:07 -0400
commit4fd1f6246ddc272192b293a5e5d5cb9dbd3e1cdf (patch)
tree3bd109be8ace3a4c227a5f90fa7e5b0e7ebd7cd9 /db/laconica.sql
parent403039510c5cc95010dacb773120779da4c43fe8 (diff)
correctly use Confirm_address
darcs-hash:20080622161607-34904-d8e042b80fe6acd3cb6ad763216a0b1817752cac.gz
Diffstat (limited to 'db/laconica.sql')
-rw-r--r--db/laconica.sql14
1 files changed, 12 insertions, 2 deletions
diff --git a/db/laconica.sql b/db/laconica.sql
index 5561076f9..1fd7dc025 100644
--- a/db/laconica.sql
+++ b/db/laconica.sql
@@ -29,6 +29,14 @@ create table avatar (
index avatar_profile_id_idx (profile_id)
) ENGINE=InnoDB;
+create table sms_carrier (
+ id integer primary key comment 'primary key for SMS carrier',
+ name varchar(64) unique key comment 'name of the carrier',
+ email_pattern varchar(255) not null comment 'sprintf pattern for making an email address from a phone number',
+ created datetime not null comment 'date this record was created',
+ modified timestamp comment 'date this record was modified'
+) ENGINE=InnoDB;
+
/* local users */
create table user (
@@ -38,6 +46,7 @@ create table user (
email varchar(255) unique key comment 'email address for password recovery etc.',
jabber varchar(255) unique key comment 'jabber ID for notices',
sms varchar(64) unique key comment 'sms phone number',
+ carrier integer comment 'foreign key to sms_carrier' references sms_carrier (id),
uri varchar(255) unique key comment 'universally unique identifier, usually a tag URI',
created datetime not null comment 'date this record was created',
modified timestamp comment 'date this record was modified'
@@ -151,6 +160,7 @@ create table confirm_address (
code varchar(32) not null primary key comment 'good random code',
user_id integer not null comment 'user who requested confirmation' references user (id),
address varchar(255) not null comment 'address (email, Jabber, SMS, etc.)',
- address_type varchar(32) not null comment 'address type ("email", "jabber", "sms")',
+ address_extra varchar(255) not null comment 'carrier ID, for SMS',
+ address_type varchar(8) not null comment 'address type ("email", "jabber", "sms")',
modified timestamp comment 'date this record was modified'
-);
+) ENGINE=InnoDB;