fusero-app-boilerplate/src/database/migrations/.snapshot-fusero-boilerplate-db.json

789 lines
20 KiB
JSON

{
"namespaces": [
"public"
],
"name": "public",
"tables": [
{
"columns": {
"id": {
"name": "id",
"type": "serial",
"unsigned": false,
"autoincrement": true,
"primary": true,
"nullable": false,
"mappedType": "integer"
},
"created_at": {
"name": "created_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 6,
"mappedType": "datetime"
},
"updated_at": {
"name": "updated_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 6,
"mappedType": "datetime"
},
"name": {
"name": "name",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 255,
"mappedType": "string"
}
},
"name": "app",
"schema": "public",
"indexes": [
{
"keyName": "app_pkey",
"columnNames": [
"id"
],
"composite": false,
"constraint": true,
"primary": true,
"unique": true
}
],
"checks": [],
"foreignKeys": {},
"nativeEnums": {}
},
{
"columns": {
"id": {
"name": "id",
"type": "serial",
"unsigned": false,
"autoincrement": true,
"primary": true,
"nullable": false,
"mappedType": "integer"
},
"created_at": {
"name": "created_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 6,
"mappedType": "datetime"
},
"updated_at": {
"name": "updated_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 6,
"mappedType": "datetime"
},
"name": {
"name": "name",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 255,
"mappedType": "string"
}
},
"name": "tenant",
"schema": "public",
"indexes": [
{
"keyName": "tenant_pkey",
"columnNames": [
"id"
],
"composite": false,
"constraint": true,
"primary": true,
"unique": true
}
],
"checks": [],
"foreignKeys": {},
"nativeEnums": {}
},
{
"columns": {
"id": {
"name": "id",
"type": "serial",
"unsigned": false,
"autoincrement": true,
"primary": true,
"nullable": false,
"mappedType": "integer"
},
"created_at": {
"name": "created_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 6,
"mappedType": "datetime"
},
"updated_at": {
"name": "updated_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 6,
"mappedType": "datetime"
},
"username": {
"name": "username",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 255,
"mappedType": "string"
},
"password": {
"name": "password",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 255,
"mappedType": "string"
},
"email": {
"name": "email",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 255,
"mappedType": "string"
}
},
"name": "user",
"schema": "public",
"indexes": [
{
"columnNames": [
"username"
],
"composite": false,
"keyName": "user_username_unique",
"constraint": true,
"primary": false,
"unique": true
},
{
"keyName": "user_pkey",
"columnNames": [
"id"
],
"composite": false,
"constraint": true,
"primary": true,
"unique": true
}
],
"checks": [],
"foreignKeys": {},
"nativeEnums": {}
},
{
"columns": {
"id": {
"name": "id",
"type": "serial",
"unsigned": false,
"autoincrement": true,
"primary": true,
"nullable": false,
"mappedType": "integer"
},
"created_at": {
"name": "created_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 6,
"mappedType": "datetime"
},
"updated_at": {
"name": "updated_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 6,
"mappedType": "datetime"
},
"tenant_id": {
"name": "tenant_id",
"type": "int",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"mappedType": "integer"
},
"app_id": {
"name": "app_id",
"type": "int",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"mappedType": "integer"
},
"user_id": {
"name": "user_id",
"type": "int",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"mappedType": "integer"
}
},
"name": "tenant_app",
"schema": "public",
"indexes": [
{
"keyName": "tenant_app_pkey",
"columnNames": [
"id"
],
"composite": false,
"constraint": true,
"primary": true,
"unique": true
}
],
"checks": [],
"foreignKeys": {
"tenant_app_tenant_id_foreign": {
"constraintName": "tenant_app_tenant_id_foreign",
"columnNames": [
"tenant_id"
],
"localTableName": "public.tenant_app",
"referencedColumnNames": [
"id"
],
"referencedTableName": "public.tenant",
"updateRule": "cascade"
},
"tenant_app_app_id_foreign": {
"constraintName": "tenant_app_app_id_foreign",
"columnNames": [
"app_id"
],
"localTableName": "public.tenant_app",
"referencedColumnNames": [
"id"
],
"referencedTableName": "public.app",
"updateRule": "cascade"
},
"tenant_app_user_id_foreign": {
"constraintName": "tenant_app_user_id_foreign",
"columnNames": [
"user_id"
],
"localTableName": "public.tenant_app",
"referencedColumnNames": [
"id"
],
"referencedTableName": "public.user",
"updateRule": "cascade"
}
},
"nativeEnums": {}
},
{
"columns": {
"id": {
"name": "id",
"type": "serial",
"unsigned": false,
"autoincrement": true,
"primary": true,
"nullable": false,
"mappedType": "integer"
},
"created_at": {
"name": "created_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 6,
"mappedType": "datetime"
},
"updated_at": {
"name": "updated_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 6,
"mappedType": "datetime"
},
"user_id": {
"name": "user_id",
"type": "int",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"mappedType": "integer"
},
"app_id": {
"name": "app_id",
"type": "int",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"mappedType": "integer"
},
"encrypted_credentials": {
"name": "encrypted_credentials",
"type": "text",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": true,
"mappedType": "text"
}
},
"name": "credential",
"schema": "public",
"indexes": [
{
"keyName": "credential_pkey",
"columnNames": [
"id"
],
"composite": false,
"constraint": true,
"primary": true,
"unique": true
}
],
"checks": [],
"foreignKeys": {
"credential_user_id_foreign": {
"constraintName": "credential_user_id_foreign",
"columnNames": [
"user_id"
],
"localTableName": "public.credential",
"referencedColumnNames": [
"id"
],
"referencedTableName": "public.user",
"updateRule": "cascade"
},
"credential_app_id_foreign": {
"constraintName": "credential_app_id_foreign",
"columnNames": [
"app_id"
],
"localTableName": "public.credential",
"referencedColumnNames": [
"id"
],
"referencedTableName": "public.app",
"updateRule": "cascade"
}
},
"nativeEnums": {}
},
{
"columns": {
"id": {
"name": "id",
"type": "serial",
"unsigned": false,
"autoincrement": true,
"primary": true,
"nullable": false,
"mappedType": "integer"
},
"created_at": {
"name": "created_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 6,
"mappedType": "datetime"
},
"updated_at": {
"name": "updated_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 6,
"mappedType": "datetime"
},
"name": {
"name": "name",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 255,
"mappedType": "string"
},
"method": {
"name": "method",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 255,
"mappedType": "string"
},
"path": {
"name": "path",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 255,
"mappedType": "string"
},
"description": {
"name": "description",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": true,
"length": 255,
"mappedType": "string"
},
"user_id": {
"name": "user_id",
"type": "int",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": true,
"mappedType": "integer"
},
"public_path": {
"name": "public_path",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": true,
"length": 255,
"mappedType": "string"
}
},
"name": "canvas_api_endpoints",
"schema": "public",
"indexes": [
{
"keyName": "canvas_api_endpoints_pkey",
"columnNames": [
"id"
],
"composite": false,
"constraint": true,
"primary": true,
"unique": true
}
],
"checks": [],
"foreignKeys": {
"canvas_api_endpoints_user_id_foreign": {
"constraintName": "canvas_api_endpoints_user_id_foreign",
"columnNames": [
"user_id"
],
"localTableName": "public.canvas_api_endpoints",
"referencedColumnNames": [
"id"
],
"referencedTableName": "public.user",
"deleteRule": "set null",
"updateRule": "cascade"
}
},
"nativeEnums": {}
},
{
"columns": {
"id": {
"name": "id",
"type": "serial",
"unsigned": false,
"autoincrement": true,
"primary": true,
"nullable": false,
"mappedType": "integer"
},
"created_at": {
"name": "created_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 6,
"mappedType": "datetime"
},
"updated_at": {
"name": "updated_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 6,
"mappedType": "datetime"
},
"key": {
"name": "key",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 255,
"mappedType": "string"
},
"user_id": {
"name": "user_id",
"type": "int",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"mappedType": "integer"
},
"app_id": {
"name": "app_id",
"type": "int",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"mappedType": "integer"
}
},
"name": "apikey",
"schema": "public",
"indexes": [
{
"keyName": "apikey_pkey",
"columnNames": [
"id"
],
"composite": false,
"constraint": true,
"primary": true,
"unique": true
}
],
"checks": [],
"foreignKeys": {
"apikey_user_id_foreign": {
"constraintName": "apikey_user_id_foreign",
"columnNames": [
"user_id"
],
"localTableName": "public.apikey",
"referencedColumnNames": [
"id"
],
"referencedTableName": "public.user",
"updateRule": "cascade"
},
"apikey_app_id_foreign": {
"constraintName": "apikey_app_id_foreign",
"columnNames": [
"app_id"
],
"localTableName": "public.apikey",
"referencedColumnNames": [
"id"
],
"referencedTableName": "public.app",
"updateRule": "cascade"
}
},
"nativeEnums": {}
},
{
"columns": {
"id": {
"name": "id",
"type": "serial",
"unsigned": false,
"autoincrement": true,
"primary": true,
"nullable": false,
"mappedType": "integer"
},
"created_at": {
"name": "created_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 6,
"mappedType": "datetime"
},
"updated_at": {
"name": "updated_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 6,
"mappedType": "datetime"
},
"name": {
"name": "name",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 255,
"mappedType": "string"
}
},
"name": "user_role",
"schema": "public",
"indexes": [
{
"keyName": "user_role_pkey",
"columnNames": [
"id"
],
"composite": false,
"constraint": true,
"primary": true,
"unique": true
}
],
"checks": [],
"foreignKeys": {},
"nativeEnums": {}
},
{
"columns": {
"user_id": {
"name": "user_id",
"type": "int",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"mappedType": "integer"
},
"user_role_id": {
"name": "user_role_id",
"type": "int",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"mappedType": "integer"
}
},
"name": "user_roles",
"schema": "public",
"indexes": [
{
"keyName": "user_roles_pkey",
"columnNames": [
"user_id",
"user_role_id"
],
"composite": true,
"constraint": true,
"primary": true,
"unique": true
}
],
"checks": [],
"foreignKeys": {
"user_roles_user_id_foreign": {
"constraintName": "user_roles_user_id_foreign",
"columnNames": [
"user_id"
],
"localTableName": "public.user_roles",
"referencedColumnNames": [
"id"
],
"referencedTableName": "public.user",
"deleteRule": "cascade",
"updateRule": "cascade"
},
"user_roles_user_role_id_foreign": {
"constraintName": "user_roles_user_role_id_foreign",
"columnNames": [
"user_role_id"
],
"localTableName": "public.user_roles",
"referencedColumnNames": [
"id"
],
"referencedTableName": "public.user_role",
"deleteRule": "cascade",
"updateRule": "cascade"
}
},
"nativeEnums": {}
}
],
"nativeEnums": {}
}