#8: Setup Schema for User Login
This commit is contained in:
parent
5106151b3b
commit
82332a8686
2 changed files with 12 additions and 1 deletions
|
@ -27,9 +27,10 @@
|
||||||
<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.groovy" />
|
||||||
</State>
|
</State>
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
|
|
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