sso-core/migrations/meta/0001_snapshot.json

1049 lines
27 KiB
JSON
Raw Permalink Normal View History

2024-05-16 20:17:06 +00:00
{
"version": "5",
"dialect": "mysql",
2024-06-01 11:42:08 +00:00
"id": "fa80e0d2-53bc-4557-a754-bc9fd9cad9aa",
"prevId": "00000000-0000-0000-0000-000000000000",
2024-05-16 20:17:06 +00:00
"tables": {
"audit_log": {
"name": "audit_log",
"columns": {
"id": {
"name": "id",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": true
2024-05-16 20:17:06 +00:00
},
"action": {
"name": "action",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"actor_ip": {
"name": "actor_ip",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"actor_ua": {
"name": "actor_ua",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"flagged": {
"name": "flagged",
"type": "tinyint",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": 0
2024-05-16 20:17:06 +00:00
},
"created_at": {
"name": "created_at",
"type": "datetime(6)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": "current_timestamp(6)"
2024-05-16 20:17:06 +00:00
},
"actorId": {
"name": "actorId",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
}
},
"indexes": {},
"foreignKeys": {
2024-06-01 11:42:08 +00:00
"audit_log_actorId_user_id_fk": {
"name": "audit_log_actorId_user_id_fk",
2024-05-16 20:17:06 +00:00
"tableFrom": "audit_log",
"tableTo": "user",
"columnsFrom": [
"actorId"
],
"columnsTo": [
"id"
],
"onDelete": "set null",
"onUpdate": "no action"
}
},
2024-06-01 11:42:08 +00:00
"compositePrimaryKeys": {},
2024-05-16 20:17:06 +00:00
"uniqueConstraints": {}
},
"document": {
"name": "document",
"columns": {
"id": {
"name": "id",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": true
2024-05-16 20:17:06 +00:00
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"slug": {
"name": "slug",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"body": {
"name": "body",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"authorId": {
"name": "authorId",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"created_at": {
"name": "created_at",
"type": "datetime(6)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": "current_timestamp(6)"
2024-05-16 20:17:06 +00:00
},
"updated_at": {
"name": "updated_at",
"type": "datetime(6)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": "current_timestamp(6)"
2024-05-16 20:17:06 +00:00
}
},
"indexes": {},
"foreignKeys": {
2024-06-01 11:42:08 +00:00
"document_authorId_user_id_fk": {
"name": "document_authorId_user_id_fk",
2024-05-16 20:17:06 +00:00
"tableFrom": "document",
"tableTo": "user",
"columnsFrom": [
"authorId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"o_auth2_client": {
"name": "o_auth2_client",
"columns": {
"id": {
"name": "id",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": true
2024-05-16 20:17:06 +00:00
},
"client_id": {
"name": "client_id",
"type": "varchar(36)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"client_secret": {
"name": "client_secret",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"title": {
"name": "title",
"type": "varchar(255)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"scope": {
"name": "scope",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"grants": {
"name": "grants",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": "('authorization_code')"
2024-05-16 20:17:06 +00:00
},
"activated": {
"name": "activated",
"type": "tinyint",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": 0
2024-05-16 20:17:06 +00:00
},
"verified": {
"name": "verified",
"type": "tinyint",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": 0
2024-05-16 20:17:06 +00:00
},
"pictureId": {
"name": "pictureId",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"ownerId": {
"name": "ownerId",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"created_at": {
"name": "created_at",
"type": "datetime(6)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": "current_timestamp(6)"
2024-05-16 20:17:06 +00:00
},
"updated_at": {
"name": "updated_at",
"type": "datetime(6)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": "current_timestamp(6)"
2024-05-16 20:17:06 +00:00
}
},
"indexes": {},
"foreignKeys": {
2024-06-01 11:42:08 +00:00
"o_auth2_client_pictureId_upload_id_fk": {
"name": "o_auth2_client_pictureId_upload_id_fk",
2024-05-16 20:17:06 +00:00
"tableFrom": "o_auth2_client",
2024-06-01 11:42:08 +00:00
"tableTo": "upload",
2024-05-16 20:17:06 +00:00
"columnsFrom": [
2024-06-01 11:42:08 +00:00
"pictureId"
2024-05-16 20:17:06 +00:00
],
"columnsTo": [
"id"
],
"onDelete": "set null",
"onUpdate": "no action"
},
2024-06-01 11:42:08 +00:00
"o_auth2_client_ownerId_user_id_fk": {
"name": "o_auth2_client_ownerId_user_id_fk",
2024-05-16 20:17:06 +00:00
"tableFrom": "o_auth2_client",
2024-06-01 11:42:08 +00:00
"tableTo": "user",
2024-05-16 20:17:06 +00:00
"columnsFrom": [
2024-06-01 11:42:08 +00:00
"ownerId"
2024-05-16 20:17:06 +00:00
],
"columnsTo": [
"id"
],
"onDelete": "set null",
"onUpdate": "no action"
}
},
2024-06-01 11:42:08 +00:00
"compositePrimaryKeys": {},
2024-05-16 20:17:06 +00:00
"uniqueConstraints": {
"IDX_e9d16c213910ad57bd05e97b42": {
"name": "IDX_e9d16c213910ad57bd05e97b42",
"columns": [
"client_id"
]
}
}
},
"o_auth2_client_authorization": {
"name": "o_auth2_client_authorization",
"columns": {
"id": {
"name": "id",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": true
2024-05-16 20:17:06 +00:00
},
"scope": {
"name": "scope",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"expires_at": {
"name": "expires_at",
"type": "timestamp",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"clientId": {
"name": "clientId",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"userId": {
"name": "userId",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"created_at": {
"name": "created_at",
"type": "datetime(6)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": "current_timestamp(6)"
},
"current": {
"name": "current",
"type": "tinyint",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 1
2024-05-16 20:17:06 +00:00
}
},
"indexes": {},
"foreignKeys": {
2024-06-01 11:42:08 +00:00
"o_auth2_client_authorization_clientId_o_auth2_client_id_fk": {
"name": "o_auth2_client_authorization_clientId_o_auth2_client_id_fk",
"tableFrom": "o_auth2_client_authorization",
"tableTo": "o_auth2_client",
"columnsFrom": [
"clientId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"o_auth2_client_authorization_userId_user_id_fk": {
"name": "o_auth2_client_authorization_userId_user_id_fk",
2024-05-16 20:17:06 +00:00
"tableFrom": "o_auth2_client_authorization",
"tableTo": "user",
"columnsFrom": [
"userId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
2024-06-01 11:42:08 +00:00
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"o_auth2_client_manager": {
"name": "o_auth2_client_manager",
"columns": {
"id": {
"name": "id",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": true
2024-05-16 20:17:06 +00:00
},
2024-06-01 11:42:08 +00:00
"clientId": {
"name": "clientId",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"userId": {
"name": "userId",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"issuerId": {
"name": "issuerId",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "datetime(6)",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "current_timestamp(6)"
},
"updated_at": {
"name": "updated_at",
"type": "datetime(6)",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "current_timestamp(6)"
}
},
"indexes": {},
"foreignKeys": {
"o_auth2_client_manager_clientId_o_auth2_client_id_fk": {
"name": "o_auth2_client_manager_clientId_o_auth2_client_id_fk",
"tableFrom": "o_auth2_client_manager",
2024-05-16 20:17:06 +00:00
"tableTo": "o_auth2_client",
"columnsFrom": [
"clientId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
2024-06-01 11:42:08 +00:00
},
"o_auth2_client_manager_userId_user_id_fk": {
"name": "o_auth2_client_manager_userId_user_id_fk",
"tableFrom": "o_auth2_client_manager",
"tableTo": "user",
"columnsFrom": [
"userId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"o_auth2_client_manager_issuerId_user_id_fk": {
"name": "o_auth2_client_manager_issuerId_user_id_fk",
"tableFrom": "o_auth2_client_manager",
"tableTo": "user",
"columnsFrom": [
"issuerId"
],
"columnsTo": [
"id"
],
"onDelete": "set null",
"onUpdate": "no action"
2024-05-16 20:17:06 +00:00
}
},
2024-06-01 11:42:08 +00:00
"compositePrimaryKeys": {},
2024-05-16 20:17:06 +00:00
"uniqueConstraints": {}
},
"o_auth2_client_url": {
"name": "o_auth2_client_url",
"columns": {
"id": {
"name": "id",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": true
2024-05-16 20:17:06 +00:00
},
"url": {
"name": "url",
"type": "varchar(255)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"type": {
"name": "type",
"type": "enum('redirect_uri','terms','privacy','website')",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"created_at": {
"name": "created_at",
"type": "timestamp(6)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": "current_timestamp(6)"
2024-05-16 20:17:06 +00:00
},
"updated_at": {
"name": "updated_at",
"type": "timestamp(6)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": "current_timestamp(6)"
2024-05-16 20:17:06 +00:00
},
"clientId": {
"name": "clientId",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
}
},
"indexes": {},
"foreignKeys": {
2024-06-01 11:42:08 +00:00
"o_auth2_client_url_clientId_o_auth2_client_id_fk": {
"name": "o_auth2_client_url_clientId_o_auth2_client_id_fk",
2024-05-16 20:17:06 +00:00
"tableFrom": "o_auth2_client_url",
"tableTo": "o_auth2_client",
"columnsFrom": [
"clientId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
2024-06-01 11:42:08 +00:00
"compositePrimaryKeys": {},
2024-05-16 20:17:06 +00:00
"uniqueConstraints": {}
},
"o_auth2_token": {
"name": "o_auth2_token",
"columns": {
"id": {
"name": "id",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": true
2024-05-16 20:17:06 +00:00
},
"type": {
"name": "type",
"type": "enum('code','access_token','refresh_token')",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"token": {
"name": "token",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"scope": {
"name": "scope",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"expires_at": {
"name": "expires_at",
"type": "timestamp",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": "current_timestamp()"
2024-05-16 20:17:06 +00:00
},
"userId": {
"name": "userId",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"clientId": {
"name": "clientId",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"nonce": {
"name": "nonce",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"created_at": {
"name": "created_at",
"type": "datetime(6)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": "current_timestamp(6)"
2024-05-16 20:17:06 +00:00
},
"updated_at": {
"name": "updated_at",
"type": "datetime(6)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": "current_timestamp(6)"
2024-05-16 20:17:06 +00:00
},
"pcke": {
"name": "pcke",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
}
},
"indexes": {},
"foreignKeys": {
2024-06-01 11:42:08 +00:00
"o_auth2_token_userId_user_id_fk": {
"name": "o_auth2_token_userId_user_id_fk",
2024-05-16 20:17:06 +00:00
"tableFrom": "o_auth2_token",
2024-06-01 11:42:08 +00:00
"tableTo": "user",
2024-05-16 20:17:06 +00:00
"columnsFrom": [
2024-06-01 11:42:08 +00:00
"userId"
2024-05-16 20:17:06 +00:00
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
2024-06-01 11:42:08 +00:00
"o_auth2_token_clientId_o_auth2_client_id_fk": {
"name": "o_auth2_token_clientId_o_auth2_client_id_fk",
2024-05-16 20:17:06 +00:00
"tableFrom": "o_auth2_token",
2024-06-01 11:42:08 +00:00
"tableTo": "o_auth2_client",
2024-05-16 20:17:06 +00:00
"columnsFrom": [
2024-06-01 11:42:08 +00:00
"clientId"
2024-05-16 20:17:06 +00:00
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
2024-06-01 11:42:08 +00:00
"compositePrimaryKeys": {},
2024-05-16 20:17:06 +00:00
"uniqueConstraints": {}
},
"privilege": {
"name": "privilege",
"columns": {
"id": {
"name": "id",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": true
2024-05-16 20:17:06 +00:00
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
},
"clientId": {
"name": "clientId",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
}
},
"indexes": {},
2024-06-01 11:42:08 +00:00
"foreignKeys": {
"privilege_clientId_o_auth2_client_id_fk": {
"name": "privilege_clientId_o_auth2_client_id_fk",
"tableFrom": "privilege",
"tableTo": "o_auth2_client",
"columnsFrom": [
"clientId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
2024-05-16 20:17:06 +00:00
"uniqueConstraints": {}
},
"upload": {
"name": "upload",
"columns": {
"id": {
"name": "id",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": true
2024-05-16 20:17:06 +00:00
},
"original_name": {
"name": "original_name",
"type": "varchar(255)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"mimetype": {
"name": "mimetype",
"type": "varchar(255)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"file": {
"name": "file",
"type": "varchar(255)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"uploaderId": {
"name": "uploaderId",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"created_at": {
"name": "created_at",
"type": "datetime(6)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": "current_timestamp(6)"
2024-05-16 20:17:06 +00:00
},
"updated_at": {
"name": "updated_at",
"type": "datetime(6)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": "current_timestamp(6)"
2024-05-16 20:17:06 +00:00
}
},
"indexes": {},
"foreignKeys": {
2024-06-01 11:42:08 +00:00
"upload_uploaderId_user_id_fk": {
"name": "upload_uploaderId_user_id_fk",
2024-05-16 20:17:06 +00:00
"tableFrom": "upload",
"tableTo": "user",
"columnsFrom": [
"uploaderId"
],
"columnsTo": [
"id"
],
"onDelete": "set null",
"onUpdate": "cascade"
}
},
2024-06-01 11:42:08 +00:00
"compositePrimaryKeys": {},
2024-05-16 20:17:06 +00:00
"uniqueConstraints": {}
},
"user": {
"name": "user",
"columns": {
"id": {
"name": "id",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": true
2024-05-16 20:17:06 +00:00
},
"uuid": {
"name": "uuid",
"type": "varchar(36)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"username": {
"name": "username",
"type": "varchar(26)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"email": {
"name": "email",
"type": "varchar(255)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"display_name": {
"name": "display_name",
"type": "varchar(32)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"password": {
"name": "password",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"activated": {
"name": "activated",
"type": "tinyint",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": 0
2024-05-16 20:17:06 +00:00
},
"activity_at": {
"name": "activity_at",
"type": "timestamp",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": "current_timestamp()"
2024-05-16 20:17:06 +00:00
},
"pictureId": {
"name": "pictureId",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"created_at": {
"name": "created_at",
"type": "datetime(6)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": "current_timestamp(6)"
2024-05-16 20:17:06 +00:00
},
"updated_at": {
"name": "updated_at",
"type": "datetime(6)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": "current_timestamp(6)"
2024-05-16 20:17:06 +00:00
}
},
"indexes": {},
"foreignKeys": {
2024-06-01 11:42:08 +00:00
"user_pictureId_upload_id_fk": {
"name": "user_pictureId_upload_id_fk",
2024-05-16 20:17:06 +00:00
"tableFrom": "user",
"tableTo": "upload",
"columnsFrom": [
"pictureId"
],
"columnsTo": [
"id"
],
"onDelete": "set null",
"onUpdate": "cascade"
}
},
2024-06-01 11:42:08 +00:00
"compositePrimaryKeys": {},
2024-05-16 20:17:06 +00:00
"uniqueConstraints": {
"IDX_a95e949168be7b7ece1a2382fe": {
"name": "IDX_a95e949168be7b7ece1a2382fe",
"columns": [
"uuid"
]
},
"IDX_78a916df40e02a9deb1c4b75ed": {
"name": "IDX_78a916df40e02a9deb1c4b75ed",
"columns": [
"username"
]
},
"IDX_e12875dfb3b1d92d7d7c5377e2": {
"name": "IDX_e12875dfb3b1d92d7d7c5377e2",
"columns": [
"email"
]
}
}
},
"user_privileges_privilege": {
"name": "user_privileges_privilege",
"columns": {
"userId": {
"name": "userId",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"privilegeId": {
"name": "privilegeId",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
}
},
"indexes": {
"IDX_0664a7ff494a1859a09014c0f1": {
"name": "IDX_0664a7ff494a1859a09014c0f1",
"columns": [
"userId"
],
"isUnique": false
},
"IDX_e71171f4ed20bc8564a1819d0b": {
"name": "IDX_e71171f4ed20bc8564a1819d0b",
"columns": [
"privilegeId"
],
"isUnique": false
}
},
"foreignKeys": {
2024-06-01 11:42:08 +00:00
"user_privileges_privilege_userId_user_id_fk": {
"name": "user_privileges_privilege_userId_user_id_fk",
2024-05-16 20:17:06 +00:00
"tableFrom": "user_privileges_privilege",
"tableTo": "user",
"columnsFrom": [
"userId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "cascade"
},
2024-06-01 11:42:08 +00:00
"user_privileges_privilege_privilegeId_privilege_id_fk": {
"name": "user_privileges_privilege_privilegeId_privilege_id_fk",
2024-05-16 20:17:06 +00:00
"tableFrom": "user_privileges_privilege",
"tableTo": "privilege",
"columnsFrom": [
"privilegeId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "cascade"
}
},
2024-06-01 11:42:08 +00:00
"compositePrimaryKeys": {},
2024-05-16 20:17:06 +00:00
"uniqueConstraints": {}
},
"user_token": {
"name": "user_token",
"columns": {
"id": {
"name": "id",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": true
2024-05-16 20:17:06 +00:00
},
"token": {
"name": "token",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"type": {
"name": "type",
"type": "enum('generic','activation','deactivation','password','login','gdpr','totp','public_key','recovery')",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"expires_at": {
"name": "expires_at",
"type": "timestamp",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"userId": {
"name": "userId",
2024-06-01 11:42:08 +00:00
"type": "int",
2024-05-16 20:17:06 +00:00
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"nonce": {
"name": "nonce",
"type": "text",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": false,
"autoincrement": false
2024-05-16 20:17:06 +00:00
},
"created_at": {
"name": "created_at",
"type": "datetime(6)",
"primaryKey": false,
2024-06-01 11:42:08 +00:00
"notNull": true,
"autoincrement": false,
"default": "current_timestamp(6)"
2024-05-16 20:17:06 +00:00
}
},
"indexes": {},
"foreignKeys": {
2024-06-01 11:42:08 +00:00
"user_token_userId_user_id_fk": {
"name": "user_token_userId_user_id_fk",
2024-05-16 20:17:06 +00:00
"tableFrom": "user_token",
"tableTo": "user",
"columnsFrom": [
"userId"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
2024-06-01 11:42:08 +00:00
"compositePrimaryKeys": {},
2024-05-16 20:17:06 +00:00
"uniqueConstraints": {}
}
},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
}
}