Database init script now creates accounts table
This commit is contained in:
		
							parent
							
								
									64026a791e
								
							
						
					
					
						commit
						9c9c106acd
					
				
					 1 changed files with 10 additions and 4 deletions
				
			
		|  | @ -22,10 +22,7 @@ scores: | |||
| accounts: | ||||
| 
 | ||||
|     users: | ||||
|         *user_id*   |   email   |   salt   |   password_hash   |   role   |   approved | ||||
| 
 | ||||
|     sessions: | ||||
|         *session_id*   |   ~user_id~   |   expiration_date | ||||
|         *user_id*   |   email   |   password   |   admin | ||||
| 
 | ||||
| */ | ||||
| 
 | ||||
|  | @ -102,4 +99,13 @@ CREATE TABLE IF NOT EXISTS scores.games( | |||
|     ); | ||||
| 
 | ||||
| 
 | ||||
| CREATE SCHEMA IF NOT EXISTS accounts; | ||||
| 
 | ||||
| CREATE TABLE IF NOT EXISTS accounts.users( | ||||
|         user_id BIGINT GENERATED ALWAYS AS IDENTITY, | ||||
|         email TEXT UNIQUE NOT NULL, | ||||
|         password TEXT NOT NULL, | ||||
|         admin BOOLEAN NOT NULL DEFAULT FALSE | ||||
|     ); | ||||
| 
 | ||||
| COMMIT; | ||||
		Reference in a new issue