Exit cleanup functions, authentication polish, db polish

This commit is contained in:
MrFry 2020-04-07 14:09:34 +02:00
parent fb8e12f8d2
commit c764c4f402
10 changed files with 314 additions and 229 deletions

View file

@ -12,7 +12,8 @@
"unique": true
},
"oldCID": {
"type": "text"
"type": "text",
"unique": true
},
"lastIP": {
"type": "text"
@ -24,24 +25,42 @@
"type": "number",
"defaultZero": true
},
"created": {
"type": "text",
"notNull": true
},
"lastLogin": {
"type": "text"
},
"lastAccess": {
"type": "text"
},
"avaiblePWRequests": {
"type": "number",
"defaultZero": true
},
"pwRequestCount": {
"type": "number",
"defaultZero": true
},
"pwGotFromCID": {
"type": "number",
"defaultZero": true
}
}
},
"sessions": {
"foreignKey": {
"keysFrom": [
"userID"
],
"table": "users",
"keysTo": [
"id"
]
},
"foreignKey": [
{
"keysFrom": [
"userID"
],
"table": "users",
"keysTo": [
"id"
]
}
],
"tableStruct": {
"id": {
"type": "text",
@ -65,18 +84,60 @@
}
}
},
"acesses": {
"accesses": {
"foreignKey": [
{
"keysFrom": [
"userID"
],
"table": "users",
"keysTo": [
"id"
]
}
],
"tableStruct": {
"accessId": {
"type": "number",
"accessID": {
"type": "integer",
"primary": true,
"autoIncrement": true
},
"userID": {
"type": "number",
"notNull": true
},
"userId": {
"type": "number"
"ip": {
"type": "text",
"notNull": true
},
"date": {
"type": "text",
"notNull": true
},
"sessionID": {
"type": "text",
"notNull": true
}
}
},
"veteranPWRequests": {
"tableStruct": {
"id": {
"type": "integer",
"primary": true,
"autoIncrement": true
},
"ip": {
"type": "text"
"type": "text",
"notNull": true
},
"count": {
"type": "number",
"defaultZero": true
},
"lastDate": {
"type": "text",
"notNull": true
}
}
}