Skip to content

Commit d459ea0

Browse files
Added setup_codes table to the cfesttings database schema documentation
Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
1 parent da91f7f commit d459ea0

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

api/enterprise-api-ref/sql-schema/cfsettings.markdown

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,3 +439,26 @@ User settings (name, email, password, timezone, provenance) and roles associated
439439
The timestamp of when the user settings were last changed.
440440
* **changetimestamp** *(timestamp with time zone)*
441441
The time zone of the user, defaults to Etc/GMT+0.
442+
443+
## Table: setup_codes
444+
445+
Stores setup codes used to complete hub setup.
446+
447+
**Columns:**
448+
449+
* **id** *(serial)*
450+
Unique auto-incrementing identifier.
451+
* **code** *(char(6))*
452+
Six-character code.
453+
* **created_at** *(timestamp with time zone)*
454+
Timestamp indicating when the setup code was created, defaults to NOW().
455+
* **expires_at** *(timestamp with time zone)*
456+
Timestamp indicating when the setup code will expire.
457+
* **attempts** *(integer)*
458+
Number of attempts made to use the setup code, defaults to 0.
459+
* **is_revoked** *(boolean)*
460+
Indicates whether the setup code has been revoked before expiration, defaults to false.
461+
* **is_used** *(boolean)*
462+
Indicates whether the setup code has been successfully used, defaults to false.
463+
* **session_id** *(varchar(64))*
464+
Session identifier linking the setup code to a session, can be null.

0 commit comments

Comments
 (0)