-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#9 updating required SQL scripts for authentication database creation…
…. Preparing for v1.2 release.
- Loading branch information
Showing
2 changed files
with
7 additions
and
3 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# Structure required to accomodate authentication information | ||
create table api_token(auto_id serial PRIMARY KEY, token varchar(64) not null, created_at timestamp not null); | ||
create table api_user(auto_id serial PRIMARY KEY, email text, password varchar (64), salt varchar (32), token_id integer references api_token (auto_id)); | ||
create table api_token(auto_id serial PRIMARY KEY, token varchar(64) unique not null, created_at timestamp not null); | ||
create table api_user(auto_id serial PRIMARY KEY, email text unique, password varchar (64), salt varchar (32) unique, authorized boolean default false, token_id integer references api_token (auto_id)); | ||
insert into api_user (email, password, salt, authorized) values ('[email protected]', 'a45ef5caf288ee1430a081b0d98f7f66a8b48a69b930c6c7740965875a3f4e1d', '21232f297a57a5a743894a0e4a801fc3', true); | ||
create index api_user_email_index on api_user (email); | ||
create index api_token_token_index on api_token (token); | ||
|