From 75cac0fd6b94f77ec8ff32ebc89ec513ee102831 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Sat, 5 Dec 2009 21:03:27 -0500 Subject: Added 'login' command that gives you a link that can be used to login to the website --- db/08to09.sql | 11 ++++++++++- db/08to09_pg.sql | 10 +++++++++- db/statusnet.sql | 10 ++++++++++ db/statusnet_pg.sql | 12 +++++++++++- 4 files changed, 40 insertions(+), 3 deletions(-) (limited to 'db') diff --git a/db/08to09.sql b/db/08to09.sql index 8d463fab4..64640f4ce 100644 --- a/db/08to09.sql +++ b/db/08to09.sql @@ -72,4 +72,13 @@ create table location_namespace ( created datetime not null comment 'date the record was created', modified timestamp comment 'date this record was modified' -) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin; \ No newline at end of file +) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin; + +create table login_token ( + user_id integer not null comment 'user owning this token' references user (id), + token char(32) not null comment 'token useable for logging in', + created datetime not null comment 'date this record was created', + modified timestamp comment 'date this record was modified', + + constraint primary key (user_id) +) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin; diff --git a/db/08to09_pg.sql b/db/08to09_pg.sql index b312d47dd..0bd47dea5 100644 --- a/db/08to09_pg.sql +++ b/db/08to09_pg.sql @@ -39,6 +39,15 @@ create table profile_role ( ); +create table login_token ( + user_id integer not null /* comment 'user owning this token'*/ references "user" (id), + token char(32) not null /* comment 'token useable for logging in'*/, + created timestamp not null DEFAULT CURRENT_TIMESTAMP /* comment 'date this record was created'*/, + modified timestamp /* comment 'date this record was modified'*/, + + primary key (user_id) +); + DROP index fave_user_id_idx; CREATE index fave_user_id_idx on fave (user_id,modified); @@ -60,4 +69,3 @@ ALTER TABLE profile ADD COLUMN lat decimal(10,7) /*comment 'latitude'*/ ; ALTER TABLE profile ADD COLUMN lon decimal(10,7) /*comment 'longitude'*/; ALTER TABLE profile ADD COLUMN location_id integer /* comment 'location id if possible'*/; ALTER TABLE profile ADD COLUMN location_ns integer /* comment 'namespace for location'*/; - \ No newline at end of file diff --git a/db/statusnet.sql b/db/statusnet.sql index f7b3b113b..18abcdfdb 100644 --- a/db/statusnet.sql +++ b/db/statusnet.sql @@ -575,3 +575,13 @@ create table location_namespace ( modified timestamp comment 'date this record was modified' ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin; + +create table login_token ( + user_id integer not null comment 'user owning this token' references user (id), + token char(32) not null comment 'token useable for logging in', + created datetime not null comment 'date this record was created', + modified timestamp comment 'date this record was modified', + + constraint primary key (user_id) +) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin; + diff --git a/db/statusnet_pg.sql b/db/statusnet_pg.sql index cd72d66ea..81b329d1e 100644 --- a/db/statusnet_pg.sql +++ b/db/statusnet_pg.sql @@ -570,4 +570,14 @@ create table profile_role ( primary key (profile_id, role) -); \ No newline at end of file +); + +create table login_token ( + user_id integer not null /* comment 'user owning this token'*/ references "user" (id), + token char(32) not null /* comment 'token useable for logging in'*/, + created timestamp not null DEFAULT CURRENT_TIMESTAMP /* comment 'date this record was created'*/, + modified timestamp /* comment 'date this record was modified'*/, + + primary key (user_id) +); + -- cgit v1.2.3-54-g00ecf