hostforge/drizzle/meta/0000_snapshot.json
2024-05-14 22:01:22 -04:00

1152 lines
30 KiB
JSON

{
"version": "5",
"dialect": "sqlite",
"id": "f5624a74-60b3-4d72-90e0-67670f26b0cd",
"prevId": "00000000-0000-0000-0000-000000000000",
"tables": {
"project_deployment": {
"name": "project_deployment",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false,
"default": "(uuid_generate_v7())"
},
"project_id": {
"name": "project_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"deployed_at": {
"name": "deployed_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
},
"status": {
"name": "status",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"proj_deployment_idx": {
"name": "proj_deployment_idx",
"columns": [
"id",
"project_id"
],
"isUnique": false
}
},
"foreignKeys": {
"project_deployment_project_id_projects_id_fk": {
"name": "project_deployment_project_id_projects_id_fk",
"tableFrom": "project_deployment",
"tableTo": "projects",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"projects": {
"name": "projects",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false,
"default": "(uuid_generate_v7())"
},
"friendly_name": {
"name": "friendly_name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"internal_name": {
"name": "internal_name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
},
"owner_id": {
"name": "owner_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"projects_internal_name_unique": {
"name": "projects_internal_name_unique",
"columns": [
"internal_name"
],
"isUnique": true
}
},
"foreignKeys": {
"projects_owner_id_users_id_fk": {
"name": "projects_owner_id_users_id_fk",
"tableFrom": "projects",
"tableTo": "users",
"columnsFrom": [
"owner_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"service": {
"name": "service",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false,
"default": "(uuid_generate_v7())"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"project_id": {
"name": "project_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"latest_generation_id": {
"name": "latest_generation_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"redeploy_secret": {
"name": "redeploy_secret",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"deployed_generation_id": {
"name": "deployed_generation_id",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
}
},
"indexes": {
"name_project_idx": {
"name": "name_project_idx",
"columns": [
"name",
"project_id"
],
"isUnique": false
},
"name_project_unq": {
"name": "name_project_unq",
"columns": [
"name",
"project_id"
],
"isUnique": true
}
},
"foreignKeys": {
"service_project_id_projects_id_fk": {
"name": "service_project_id_projects_id_fk",
"tableFrom": "service",
"tableTo": "projects",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"service_latest_generation_id_service_generation_id_fk": {
"name": "service_latest_generation_id_service_generation_id_fk",
"tableFrom": "service",
"tableTo": "service_generation",
"columnsFrom": [
"latest_generation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"service_deployed_generation_id_service_generation_id_fk": {
"name": "service_deployed_generation_id_service_generation_id_fk",
"tableFrom": "service",
"tableTo": "service_generation",
"columnsFrom": [
"deployed_generation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"service_deployment": {
"name": "service_deployment",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false,
"default": "(uuid_generate_v7())"
},
"project_deployment_id": {
"name": "project_deployment_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"service_id": {
"name": "service_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
},
"deployed_by": {
"name": "deployed_by",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"build_logs": {
"name": "build_logs",
"type": "blob",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"status": {
"name": "status",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {
"service_deployment_project_deployment_id_project_deployment_id_fk": {
"name": "service_deployment_project_deployment_id_project_deployment_id_fk",
"tableFrom": "service_deployment",
"tableTo": "project_deployment",
"columnsFrom": [
"project_deployment_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"service_deployment_service_id_service_generation_id_fk": {
"name": "service_deployment_service_id_service_generation_id_fk",
"tableFrom": "service_deployment",
"tableTo": "service_generation",
"columnsFrom": [
"service_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"service_deployment_deployed_by_users_id_fk": {
"name": "service_deployment_deployed_by_users_id_fk",
"tableFrom": "service_deployment",
"tableTo": "users",
"columnsFrom": [
"deployed_by"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"service_domain": {
"name": "service_domain",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false,
"default": "(uuid_generate_v7())"
},
"service_id": {
"name": "service_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"domain": {
"name": "domain",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"internal_port": {
"name": "internal_port",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"https": {
"name": "https",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
},
"force_ssl": {
"name": "force_ssl",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
}
},
"indexes": {},
"foreignKeys": {
"service_domain_service_id_service_generation_id_fk": {
"name": "service_domain_service_id_service_generation_id_fk",
"tableFrom": "service_domain",
"tableTo": "service_generation",
"columnsFrom": [
"service_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"service_generation": {
"name": "service_generation",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false,
"default": "(uuid_generate_v7())"
},
"service_id": {
"name": "service_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"deployment_id": {
"name": "deployment_id",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"source": {
"name": "source",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"environment": {
"name": "environment",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"docker_image": {
"name": "docker_image",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"docker_registry_username": {
"name": "docker_registry_username",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"docker_registry_password": {
"name": "docker_registry_password",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"github_username": {
"name": "github_username",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"github_repository": {
"name": "github_repository",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"github_branch": {
"name": "github_branch",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"git_url": {
"name": "git_url",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"git_branch": {
"name": "git_branch",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"build_method": {
"name": "build_method",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 2
},
"build_path": {
"name": "build_path",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'/'"
},
"command": {
"name": "command",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"entrypoint": {
"name": "entrypoint",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"replicas": {
"name": "replicas",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 1
},
"max_replicas_per_node": {
"name": "max_replicas_per_node",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"deploy_mode": {
"name": "deploy_mode",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 1
},
"zero_downtime": {
"name": "zero_downtime",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
},
"max_cpu": {
"name": "max_cpu",
"type": "real",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
},
"max_memory": {
"name": "max_memory",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'0'"
},
"max_pids": {
"name": "max_pids",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
},
"restart": {
"name": "restart",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 2
},
"restart_delay": {
"name": "restart_delay",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "'5s'"
},
"restart_max_attempts": {
"name": "restart_max_attempts",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"healthcheck_enabled": {
"name": "healthcheck_enabled",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
},
"healthcheck_command": {
"name": "healthcheck_command",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"healthcheck_interval": {
"name": "healthcheck_interval",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'30s'"
},
"healthcheck_timeout": {
"name": "healthcheck_timeout",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'30s'"
},
"healthcheck_retries": {
"name": "healthcheck_retries",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 3
},
"healthcheck_start_period": {
"name": "healthcheck_start_period",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'0s'"
},
"logging_max_size": {
"name": "logging_max_size",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'-1'"
},
"logging_max_files": {
"name": "logging_max_files",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 1
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
}
},
"indexes": {
"proj_generation_idx": {
"name": "proj_generation_idx",
"columns": [
"id",
"service_id"
],
"isUnique": false
}
},
"foreignKeys": {
"service_generation_service_id_service_id_fk": {
"name": "service_generation_service_id_service_id_fk",
"tableFrom": "service_generation",
"tableTo": "service",
"columnsFrom": [
"service_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"service_generation_deployment_id_service_deployment_id_fk": {
"name": "service_generation_deployment_id_service_deployment_id_fk",
"tableFrom": "service_generation",
"tableTo": "service_deployment",
"columnsFrom": [
"deployment_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"service_port": {
"name": "service_port",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false,
"default": "(uuid_generate_v7())"
},
"service_id": {
"name": "service_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"internal_port": {
"name": "internal_port",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"external_port": {
"name": "external_port",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"port_type": {
"name": "port_type",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"type": {
"name": "type",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {
"service_port_service_id_service_generation_id_fk": {
"name": "service_port_service_id_service_generation_id_fk",
"tableFrom": "service_port",
"tableTo": "service_generation",
"columnsFrom": [
"service_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"service_sysctl": {
"name": "service_sysctl",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false,
"default": "(uuid_generate_v7())"
},
"service_id": {
"name": "service_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"key": {
"name": "key",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"value": {
"name": "value",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {
"service_sysctl_service_id_service_generation_id_fk": {
"name": "service_sysctl_service_id_service_generation_id_fk",
"tableFrom": "service_sysctl",
"tableTo": "service_generation",
"columnsFrom": [
"service_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"service_ulimit": {
"name": "service_ulimit",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false,
"default": "(uuid_generate_v7())"
},
"service_id": {
"name": "service_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"soft": {
"name": "soft",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"hard": {
"name": "hard",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {
"service_ulimit_service_id_service_generation_id_fk": {
"name": "service_ulimit_service_id_service_generation_id_fk",
"tableFrom": "service_ulimit",
"tableTo": "service_generation",
"columnsFrom": [
"service_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"service_volume": {
"name": "service_volume",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false,
"default": "(uuid_generate_v7())"
},
"service_id": {
"name": "service_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"source": {
"name": "source",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"target": {
"name": "target",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"type": {
"name": "type",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {
"service_volume_service_id_service_generation_id_fk": {
"name": "service_volume_service_id_service_generation_id_fk",
"tableFrom": "service_volume",
"tableTo": "service_generation",
"columnsFrom": [
"service_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"session": {
"name": "session",
"columns": {
"token": {
"name": "token",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"last_useragent": {
"name": "last_useragent",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"last_ip": {
"name": "last_ip",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"last_accessed": {
"name": "last_accessed",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
},
"id": {
"name": "id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {
"session_id_users_id_fk": {
"name": "session_id_users_id_fk",
"tableFrom": "session",
"tableTo": "users",
"columnsFrom": [
"id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"system_stats": {
"name": "system_stats",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
},
"cpu_usage": {
"name": "cpu_usage",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"memory_usage": {
"name": "memory_usage",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"disk_usage": {
"name": "disk_usage",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"network_tx": {
"name": "network_tx",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"network_rx": {
"name": "network_rx",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"users": {
"name": "users",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false,
"default": "(uuid_generate_v7())"
},
"username": {
"name": "username",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"password": {
"name": "password",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"mfa_token": {
"name": "mfa_token",
"type": "blob",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {
"users_username_unique": {
"name": "users_username_unique",
"columns": [
"username"
],
"isUnique": true
},
"username_idx": {
"name": "username_idx",
"columns": [
"username"
],
"isUnique": false
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
}
},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
}
}