#8: Setup Schema for User Login
This commit is contained in:
parent
5106151b3b
commit
0d23177712
2 changed files with 11 additions and 0 deletions
|
@ -27,6 +27,7 @@
|
||||||
<option value="file://$PROJECT_DIR$/src/main/resources/de/hitec/nhplus/nurse/database/Nurse.sql" />
|
<option value="file://$PROJECT_DIR$/src/main/resources/de/hitec/nhplus/nurse/database/Nurse.sql" />
|
||||||
<option value="file://$PROJECT_DIR$/src/main/resources/de/hitec/nhplus/medication/database/Medication.sql" />
|
<option value="file://$PROJECT_DIR$/src/main/resources/de/hitec/nhplus/medication/database/Medication.sql" />
|
||||||
<option value="file://$PROJECT_DIR$/src/main/resources/de/hitec/nhplus/medication/database/Medication_Ingredient.sql" />
|
<option value="file://$PROJECT_DIR$/src/main/resources/de/hitec/nhplus/medication/database/Medication_Ingredient.sql" />
|
||||||
|
<option value="file://$PROJECT_DIR$/src/main/resources/de/hitec/nhplus/login/database/User.sql" />
|
||||||
</array>
|
</array>
|
||||||
</option>
|
</option>
|
||||||
<option name="outLayout" value="File per object by schema.groovy" />
|
<option name="outLayout" value="File per object by schema.groovy" />
|
||||||
|
|
10
src/main/resources/de/hitec/nhplus/login/database/User.sql
Normal file
10
src/main/resources/de/hitec/nhplus/login/database/User.sql
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
CREATE TABLE user
|
||||||
|
(
|
||||||
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
|
username TEXT NOT NULL,
|
||||||
|
passwordSalt BINARY(16) NOT NULL, -- 16 Byte Salt
|
||||||
|
passwordHash BINARY(64) NOT NULL, -- SHA-512 Size
|
||||||
|
nurseId INTEGER DEFAULT NULL,
|
||||||
|
isAdmin BOOLEAN DEFAULT false,
|
||||||
|
FOREIGN KEY (nurseId) REFERENCES nurse (id) ON DELETE CASCADE
|
||||||
|
)
|
Loading…
Reference in a new issue