760 lines
16 KiB
JSON
760 lines
16 KiB
JSON
{
|
|
"version": "7",
|
|
"dialect": "sqlite",
|
|
"id": "b3403d40-d4c3-4f1a-8d1d-763c548f5bc7",
|
|
"prevIds": [
|
|
"32f84774-44a1-4363-85d8-8b00b9de063f"
|
|
],
|
|
"ddl": [
|
|
{
|
|
"name": "account",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"name": "machines",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"name": "session",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"name": "two_factor",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"name": "user",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"name": "verification",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "access_token",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "access_token_expires_at",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "account_id",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "created_at",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "id",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "id_token",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "password",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "provider_id",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "refresh_token",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "refresh_token_expires_at",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "scope",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "updated_at",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "user_id",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'http://127.0.0.1:9999'",
|
|
"generated": null,
|
|
"name": "address",
|
|
"entityType": "columns",
|
|
"table": "machines"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "id",
|
|
"entityType": "columns",
|
|
"table": "machines"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "name",
|
|
"entityType": "columns",
|
|
"table": "machines"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "order",
|
|
"entityType": "columns",
|
|
"table": "machines"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "token",
|
|
"entityType": "columns",
|
|
"table": "machines"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "created_at",
|
|
"entityType": "columns",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "expires_at",
|
|
"entityType": "columns",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "id",
|
|
"entityType": "columns",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "impersonated_by",
|
|
"entityType": "columns",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "ip_address",
|
|
"entityType": "columns",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "token",
|
|
"entityType": "columns",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "updated_at",
|
|
"entityType": "columns",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "user_agent",
|
|
"entityType": "columns",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "user_id",
|
|
"entityType": "columns",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "backup_codes",
|
|
"entityType": "columns",
|
|
"table": "two_factor"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "id",
|
|
"entityType": "columns",
|
|
"table": "two_factor"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "secret",
|
|
"entityType": "columns",
|
|
"table": "two_factor"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "user_id",
|
|
"entityType": "columns",
|
|
"table": "two_factor"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "true",
|
|
"generated": null,
|
|
"name": "verified",
|
|
"entityType": "columns",
|
|
"table": "two_factor"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "ban_expires",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "false",
|
|
"generated": null,
|
|
"name": "banned",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "ban_reason",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "created_at",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "display_username",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "email",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "false",
|
|
"generated": null,
|
|
"name": "email_verified",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "id",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "image",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "name",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "role",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "false",
|
|
"generated": null,
|
|
"name": "two_factor_enabled",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "updated_at",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "username",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "created_at",
|
|
"entityType": "columns",
|
|
"table": "verification"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "expires_at",
|
|
"entityType": "columns",
|
|
"table": "verification"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "id",
|
|
"entityType": "columns",
|
|
"table": "verification"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "identifier",
|
|
"entityType": "columns",
|
|
"table": "verification"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "updated_at",
|
|
"entityType": "columns",
|
|
"table": "verification"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "value",
|
|
"entityType": "columns",
|
|
"table": "verification"
|
|
},
|
|
{
|
|
"columns": [
|
|
"user_id"
|
|
],
|
|
"tableTo": "user",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"nameExplicit": false,
|
|
"name": "fk_account_user_id_user_id_fk",
|
|
"entityType": "fks",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"columns": [
|
|
"user_id"
|
|
],
|
|
"tableTo": "user",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"nameExplicit": false,
|
|
"name": "fk_session_user_id_user_id_fk",
|
|
"entityType": "fks",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"columns": [
|
|
"user_id"
|
|
],
|
|
"tableTo": "user",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"nameExplicit": false,
|
|
"name": "fk_two_factor_user_id_user_id_fk",
|
|
"entityType": "fks",
|
|
"table": "two_factor"
|
|
},
|
|
{
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "account_pk",
|
|
"table": "account",
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "machines_pk",
|
|
"table": "machines",
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "session_pk",
|
|
"table": "session",
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "two_factor_pk",
|
|
"table": "two_factor",
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "user_pk",
|
|
"table": "user",
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "verification_pk",
|
|
"table": "verification",
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "user_id",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "account_userId_idx",
|
|
"entityType": "indexes",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "user_id",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "session_userId_idx",
|
|
"entityType": "indexes",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "secret",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "twoFactor_secret_idx",
|
|
"entityType": "indexes",
|
|
"table": "two_factor"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "user_id",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "twoFactor_userId_idx",
|
|
"entityType": "indexes",
|
|
"table": "two_factor"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "identifier",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "verification_identifier_idx",
|
|
"entityType": "indexes",
|
|
"table": "verification"
|
|
},
|
|
{
|
|
"columns": [
|
|
"order"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "machines_order_unique",
|
|
"entityType": "uniques",
|
|
"table": "machines"
|
|
},
|
|
{
|
|
"columns": [
|
|
"token"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "session_token_unique",
|
|
"entityType": "uniques",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"columns": [
|
|
"email"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "user_email_unique",
|
|
"entityType": "uniques",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"columns": [
|
|
"username"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "user_username_unique",
|
|
"entityType": "uniques",
|
|
"table": "user"
|
|
}
|
|
],
|
|
"renames": []
|
|
} |