adding the table creations and data insertion queries
This commit is contained in:
parent
6ea35de5dd
commit
6f170a30f3
|
@ -11,6 +11,40 @@ import (
|
|||
)
|
||||
|
||||
// Tests must be run in order
|
||||
// Table creation:
|
||||
/* #####################################################################################################################
|
||||
CREATE TABLE accounts (
|
||||
id TEXT PRIMARY KEY,
|
||||
namespace TEXT,
|
||||
data JSONB,
|
||||
metadata JSONB
|
||||
);
|
||||
|
||||
CREATE TABLE account_auth (
|
||||
account_id TEXT PRIMARY KEY,
|
||||
username TEXT,
|
||||
password TEXT,
|
||||
email TEXT,
|
||||
email_validation JSONB,
|
||||
phone_number TEXT,
|
||||
phone_number_validation JSONB,
|
||||
FOREIGN KEY (account_id) REFERENCES accounts(id)
|
||||
);
|
||||
#######################################################################################################################
|
||||
*/
|
||||
/* Inserting an Account: (Password = test)
|
||||
#######################################################################################################################
|
||||
INSERT INTO accounts (id, namespace, data, metadata)
|
||||
VALUES ('2faa137b-27be-476f-b98c-8b7eed6f1f3a', 'parcoursmob', '{"email": "salimbouaram12@gmail.com", "gender": "9",
|
||||
"groups": ["483280d0-db2d-4f06-b361-02e4be5012d2", "483280d0-db2d-4f06-b361-02e4be5012d2:admin"], "last_name": "salim",
|
||||
"first_name": "salim", "display_name": "salim salim", "phone_number": ""}', '{"created": "2023-04-24T09:29:18.262+00:00"}');
|
||||
#######################################################################################################################
|
||||
INSERT INTO account_auth (account_id, username, password, email, email_validation, phone_number, phone_number_validation)
|
||||
VALUES ('2faa137b-27be-476f-b98c-8b7eed6f1f3a', 'salim-amine.bou-aram@coopgo.fr',
|
||||
'$2a$10$j9LwkGYT6HhLpWxUvpEniOJ3nBKEhwAn52G.t4QYMgje4HnJuWqHK', 'salim-amine.bou-aram@coopgo.fr',
|
||||
'{"validated": false, "validation_code": ""}', '0749331953', '{"validated": false, "validation_code": ""}');
|
||||
#######################################################################################################################
|
||||
*/
|
||||
|
||||
var cfg *viper.Viper
|
||||
|
||||
|
|
Loading…
Reference in New Issue