604 lines
15 KiB
JSON
604 lines
15 KiB
JSON
|
|
{
|
||
|
|
"id": "72292622-d326-46fe-8e6a-90096c7e6634",
|
||
|
|
"prevId": "00000000-0000-0000-0000-000000000000",
|
||
|
|
"version": "7",
|
||
|
|
"dialect": "postgresql",
|
||
|
|
"tables": {
|
||
|
|
"public.allowed_image_hosts": {
|
||
|
|
"name": "allowed_image_hosts",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"hostname": {
|
||
|
|
"name": "hostname",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"enabled": {
|
||
|
|
"name": "enabled",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": true
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"name": "description",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updated_at": {
|
||
|
|
"name": "updated_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"allowed_image_hosts_hostname_idx": {
|
||
|
|
"name": "allowed_image_hosts_hostname_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "hostname",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": true,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.image_asset_versions": {
|
||
|
|
"name": "image_asset_versions",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"asset_id": {
|
||
|
|
"name": "asset_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"version": {
|
||
|
|
"name": "version",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"source_url": {
|
||
|
|
"name": "source_url",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"source_host": {
|
||
|
|
"name": "source_host",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"source_hash": {
|
||
|
|
"name": "source_hash",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"original_s3_key": {
|
||
|
|
"name": "original_s3_key",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"width": {
|
||
|
|
"name": "width",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"height": {
|
||
|
|
"name": "height",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"content_type": {
|
||
|
|
"name": "content_type",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"size_bytes": {
|
||
|
|
"name": "size_bytes",
|
||
|
|
"type": "bigint",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"image_asset_versions_asset_version_idx": {
|
||
|
|
"name": "image_asset_versions_asset_version_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "asset_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "version",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": true,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"image_asset_versions_source_hash_idx": {
|
||
|
|
"name": "image_asset_versions_source_hash_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "source_hash",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"image_asset_versions_asset_id_image_assets_id_fk": {
|
||
|
|
"name": "image_asset_versions_asset_id_image_assets_id_fk",
|
||
|
|
"tableFrom": "image_asset_versions",
|
||
|
|
"tableTo": "image_assets",
|
||
|
|
"columnsFrom": [
|
||
|
|
"asset_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.image_assets": {
|
||
|
|
"name": "image_assets",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"public_id": {
|
||
|
|
"name": "public_id",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"current_version": {
|
||
|
|
"name": "current_version",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 1
|
||
|
|
},
|
||
|
|
"status": {
|
||
|
|
"name": "status",
|
||
|
|
"type": "asset_status",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'active'"
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updated_at": {
|
||
|
|
"name": "updated_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"image_assets_public_id_idx": {
|
||
|
|
"name": "image_assets_public_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "public_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": true,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.image_variants": {
|
||
|
|
"name": "image_variants",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"asset_id": {
|
||
|
|
"name": "asset_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"asset_version_id": {
|
||
|
|
"name": "asset_version_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"asset_version": {
|
||
|
|
"name": "asset_version",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"preset": {
|
||
|
|
"name": "preset",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"variant_hash": {
|
||
|
|
"name": "variant_hash",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"requested_format": {
|
||
|
|
"name": "requested_format",
|
||
|
|
"type": "requested_format",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'auto'"
|
||
|
|
},
|
||
|
|
"format": {
|
||
|
|
"name": "format",
|
||
|
|
"type": "variant_format",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"width": {
|
||
|
|
"name": "width",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"height": {
|
||
|
|
"name": "height",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"quality": {
|
||
|
|
"name": "quality",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"s3_key": {
|
||
|
|
"name": "s3_key",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"content_type": {
|
||
|
|
"name": "content_type",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"etag": {
|
||
|
|
"name": "etag",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"status": {
|
||
|
|
"name": "status",
|
||
|
|
"type": "variant_status",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'pending'"
|
||
|
|
},
|
||
|
|
"size_bytes": {
|
||
|
|
"name": "size_bytes",
|
||
|
|
"type": "bigint",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"error": {
|
||
|
|
"name": "error",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"attempt_count": {
|
||
|
|
"name": "attempt_count",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"last_accessed_at": {
|
||
|
|
"name": "last_accessed_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updated_at": {
|
||
|
|
"name": "updated_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"image_variants_lookup_idx": {
|
||
|
|
"name": "image_variants_lookup_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "asset_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "asset_version",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "preset",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "width",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "quality",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "format",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": true,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"image_variants_s3_key_idx": {
|
||
|
|
"name": "image_variants_s3_key_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "s3_key",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": true,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"image_variants_variant_hash_idx": {
|
||
|
|
"name": "image_variants_variant_hash_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "variant_hash",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": true,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"image_variants_status_idx": {
|
||
|
|
"name": "image_variants_status_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "status",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"image_variants_asset_id_image_assets_id_fk": {
|
||
|
|
"name": "image_variants_asset_id_image_assets_id_fk",
|
||
|
|
"tableFrom": "image_variants",
|
||
|
|
"tableTo": "image_assets",
|
||
|
|
"columnsFrom": [
|
||
|
|
"asset_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"image_variants_asset_version_id_image_asset_versions_id_fk": {
|
||
|
|
"name": "image_variants_asset_version_id_image_asset_versions_id_fk",
|
||
|
|
"tableFrom": "image_variants",
|
||
|
|
"tableTo": "image_asset_versions",
|
||
|
|
"columnsFrom": [
|
||
|
|
"asset_version_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"enums": {
|
||
|
|
"public.asset_status": {
|
||
|
|
"name": "asset_status",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"active",
|
||
|
|
"disabled",
|
||
|
|
"deleted"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.requested_format": {
|
||
|
|
"name": "requested_format",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"auto",
|
||
|
|
"avif",
|
||
|
|
"webp",
|
||
|
|
"jpg",
|
||
|
|
"png"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.variant_format": {
|
||
|
|
"name": "variant_format",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"avif",
|
||
|
|
"webp",
|
||
|
|
"jpg",
|
||
|
|
"png"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.variant_status": {
|
||
|
|
"name": "variant_status",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"pending",
|
||
|
|
"processing",
|
||
|
|
"ready",
|
||
|
|
"failed"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"schemas": {},
|
||
|
|
"sequences": {},
|
||
|
|
"roles": {},
|
||
|
|
"policies": {},
|
||
|
|
"views": {},
|
||
|
|
"_meta": {
|
||
|
|
"columns": {},
|
||
|
|
"schemas": {},
|
||
|
|
"tables": {}
|
||
|
|
}
|
||
|
|
}
|