b59904fdae
Data model - Properties, rooms (+optional floors), assets (typed custom fields + Zod runtime validator + move history), documents (polymorphic scope) - Projects -> work packages -> tasks -> subtasks - Decision events (scoped to project/property/asset/work_package) - Checklist templates + instances, maintenance schedules (time + usage) with auto-materialized checklists on event recording - Wiki (global + per-project) with revisions + tsvector FTS - Property accounts (utility/meter numbers by kind) - Notifications table + per-user channel prefs Infra - RBAC guards (requireCompany / requireAdmin) - Storage abstraction: LocalDiskStorage (HMAC signed URLs) + S3Storage behind the same interface, switchable via STORAGE_BACKEND - CSV export for assets / maintenance / decisions - QR labels: /api/qr SVG endpoint + printable /assets/[id]/label - Notifications: in-app + SMTP (own server via nodemailer) + Matrix (Client-Server API, per-company room) with opt-in per user - Company switcher + auto-select first company on login UI - Topbar: bell with unread count, theme toggle, name, Sign Out (flat) - Sidebar: main nav + dedicated Admin section (Asset types, Users, Company) - Nested-route tabs on property / project / asset detail pages - Admin UIs for users (invite, role, reset pw, deactivate) and company settings (default currency, Matrix room id) - Custom asset type creation + field-def editor with immutable key/type guard and auto-deprecate when removing a field still referenced Graph - graphify-out/ committed: GRAPH_REPORT.md, graph.html, graph.json
3404 lines
87 KiB
JSON
3404 lines
87 KiB
JSON
{
|
|
"id": "58ec9a30-464f-49ba-86a3-a53e2ecb5952",
|
|
"prevId": "64cecc29-6730-428a-9b30-85e6dfa022d0",
|
|
"version": "7",
|
|
"dialect": "postgresql",
|
|
"tables": {
|
|
"public.asset_field_defs": {
|
|
"name": "asset_field_defs",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"asset_type_id": {
|
|
"name": "asset_type_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"key": {
|
|
"name": "key",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"label": {
|
|
"name": "label",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "field_type",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"required": {
|
|
"name": "required",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"order": {
|
|
"name": "order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"enum_values": {
|
|
"name": "enum_values",
|
|
"type": "text[]",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"unit": {
|
|
"name": "unit",
|
|
"type": "varchar(32)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"placeholder": {
|
|
"name": "placeholder",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"help_text": {
|
|
"name": "help_text",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"deprecated_at": {
|
|
"name": "deprecated_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": {
|
|
"asset_field_defs_type_key_uq": {
|
|
"name": "asset_field_defs_type_key_uq",
|
|
"columns": [
|
|
{
|
|
"expression": "asset_type_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "key",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"asset_field_defs_by_type": {
|
|
"name": "asset_field_defs_by_type",
|
|
"columns": [
|
|
{
|
|
"expression": "asset_type_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "order",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"asset_field_defs_asset_type_id_asset_types_id_fk": {
|
|
"name": "asset_field_defs_asset_type_id_asset_types_id_fk",
|
|
"tableFrom": "asset_field_defs",
|
|
"tableTo": "asset_types",
|
|
"columnsFrom": [
|
|
"asset_type_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.asset_location_history": {
|
|
"name": "asset_location_history",
|
|
"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
|
|
},
|
|
"from_kind": {
|
|
"name": "from_kind",
|
|
"type": "container_kind",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"from_project_id": {
|
|
"name": "from_project_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"from_property_id": {
|
|
"name": "from_property_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"to_kind": {
|
|
"name": "to_kind",
|
|
"type": "container_kind",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"to_project_id": {
|
|
"name": "to_project_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"to_property_id": {
|
|
"name": "to_property_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"moved_by": {
|
|
"name": "moved_by",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"moved_at": {
|
|
"name": "moved_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"reason": {
|
|
"name": "reason",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"alh_by_asset": {
|
|
"name": "alh_by_asset",
|
|
"columns": [
|
|
{
|
|
"expression": "asset_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "moved_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"asset_location_history_asset_id_assets_id_fk": {
|
|
"name": "asset_location_history_asset_id_assets_id_fk",
|
|
"tableFrom": "asset_location_history",
|
|
"tableTo": "assets",
|
|
"columnsFrom": [
|
|
"asset_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"asset_location_history_from_project_id_projects_id_fk": {
|
|
"name": "asset_location_history_from_project_id_projects_id_fk",
|
|
"tableFrom": "asset_location_history",
|
|
"tableTo": "projects",
|
|
"columnsFrom": [
|
|
"from_project_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"asset_location_history_from_property_id_properties_id_fk": {
|
|
"name": "asset_location_history_from_property_id_properties_id_fk",
|
|
"tableFrom": "asset_location_history",
|
|
"tableTo": "properties",
|
|
"columnsFrom": [
|
|
"from_property_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"asset_location_history_to_project_id_projects_id_fk": {
|
|
"name": "asset_location_history_to_project_id_projects_id_fk",
|
|
"tableFrom": "asset_location_history",
|
|
"tableTo": "projects",
|
|
"columnsFrom": [
|
|
"to_project_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"asset_location_history_to_property_id_properties_id_fk": {
|
|
"name": "asset_location_history_to_property_id_properties_id_fk",
|
|
"tableFrom": "asset_location_history",
|
|
"tableTo": "properties",
|
|
"columnsFrom": [
|
|
"to_property_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"asset_location_history_moved_by_users_id_fk": {
|
|
"name": "asset_location_history_moved_by_users_id_fk",
|
|
"tableFrom": "asset_location_history",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"moved_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.asset_logs": {
|
|
"name": "asset_logs",
|
|
"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
|
|
},
|
|
"author_id": {
|
|
"name": "author_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"body": {
|
|
"name": "body",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"asset_logs_by_asset": {
|
|
"name": "asset_logs_by_asset",
|
|
"columns": [
|
|
{
|
|
"expression": "asset_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "created_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"asset_logs_asset_id_assets_id_fk": {
|
|
"name": "asset_logs_asset_id_assets_id_fk",
|
|
"tableFrom": "asset_logs",
|
|
"tableTo": "assets",
|
|
"columnsFrom": [
|
|
"asset_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"asset_logs_author_id_users_id_fk": {
|
|
"name": "asset_logs_author_id_users_id_fk",
|
|
"tableFrom": "asset_logs",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"author_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.asset_types": {
|
|
"name": "asset_types",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"company_id": {
|
|
"name": "company_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"parent_id": {
|
|
"name": "parent_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"slug": {
|
|
"name": "slug",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"icon": {
|
|
"name": "icon",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"schema_version": {
|
|
"name": "schema_version",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 1
|
|
},
|
|
"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": {
|
|
"asset_types_company_slug_uq": {
|
|
"name": "asset_types_company_slug_uq",
|
|
"columns": [
|
|
{
|
|
"expression": "company_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "slug",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"asset_types_by_parent": {
|
|
"name": "asset_types_by_parent",
|
|
"columns": [
|
|
{
|
|
"expression": "parent_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"asset_types_company_id_companies_id_fk": {
|
|
"name": "asset_types_company_id_companies_id_fk",
|
|
"tableFrom": "asset_types",
|
|
"tableTo": "companies",
|
|
"columnsFrom": [
|
|
"company_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.assets": {
|
|
"name": "assets",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"company_id": {
|
|
"name": "company_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"asset_type_id": {
|
|
"name": "asset_type_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"tag": {
|
|
"name": "tag",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"serial_number": {
|
|
"name": "serial_number",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"manufacturer": {
|
|
"name": "manufacturer",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"model": {
|
|
"name": "model",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"purchased_at": {
|
|
"name": "purchased_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"current_container_kind": {
|
|
"name": "current_container_kind",
|
|
"type": "container_kind",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"current_project_id": {
|
|
"name": "current_project_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"current_property_id": {
|
|
"name": "current_property_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"custom_fields": {
|
|
"name": "custom_fields",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'{}'::jsonb"
|
|
},
|
|
"search_tsv": {
|
|
"name": "search_tsv",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_by": {
|
|
"name": "created_by",
|
|
"type": "uuid",
|
|
"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()"
|
|
},
|
|
"deleted_at": {
|
|
"name": "deleted_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"assets_by_company": {
|
|
"name": "assets_by_company",
|
|
"columns": [
|
|
{
|
|
"expression": "company_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"assets_by_type": {
|
|
"name": "assets_by_type",
|
|
"columns": [
|
|
{
|
|
"expression": "asset_type_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"assets_by_project": {
|
|
"name": "assets_by_project",
|
|
"columns": [
|
|
{
|
|
"expression": "current_project_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"assets_by_property": {
|
|
"name": "assets_by_property",
|
|
"columns": [
|
|
{
|
|
"expression": "current_property_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"assets_company_tag_uq": {
|
|
"name": "assets_company_tag_uq",
|
|
"columns": [
|
|
{
|
|
"expression": "company_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "tag",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"assets_company_serial_uq": {
|
|
"name": "assets_company_serial_uq",
|
|
"columns": [
|
|
{
|
|
"expression": "company_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "serial_number",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"assets_company_id_companies_id_fk": {
|
|
"name": "assets_company_id_companies_id_fk",
|
|
"tableFrom": "assets",
|
|
"tableTo": "companies",
|
|
"columnsFrom": [
|
|
"company_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"assets_asset_type_id_asset_types_id_fk": {
|
|
"name": "assets_asset_type_id_asset_types_id_fk",
|
|
"tableFrom": "assets",
|
|
"tableTo": "asset_types",
|
|
"columnsFrom": [
|
|
"asset_type_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "restrict",
|
|
"onUpdate": "no action"
|
|
},
|
|
"assets_current_project_id_projects_id_fk": {
|
|
"name": "assets_current_project_id_projects_id_fk",
|
|
"tableFrom": "assets",
|
|
"tableTo": "projects",
|
|
"columnsFrom": [
|
|
"current_project_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "restrict",
|
|
"onUpdate": "no action"
|
|
},
|
|
"assets_current_property_id_properties_id_fk": {
|
|
"name": "assets_current_property_id_properties_id_fk",
|
|
"tableFrom": "assets",
|
|
"tableTo": "properties",
|
|
"columnsFrom": [
|
|
"current_property_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "restrict",
|
|
"onUpdate": "no action"
|
|
},
|
|
"assets_created_by_users_id_fk": {
|
|
"name": "assets_created_by_users_id_fk",
|
|
"tableFrom": "assets",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"created_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.checklist_instances": {
|
|
"name": "checklist_instances",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"company_id": {
|
|
"name": "company_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"template_id": {
|
|
"name": "template_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"scope_type": {
|
|
"name": "scope_type",
|
|
"type": "checklist_scope",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"scope_id": {
|
|
"name": "scope_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_by": {
|
|
"name": "created_by",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"completed_at": {
|
|
"name": "completed_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"ci_by_scope": {
|
|
"name": "ci_by_scope",
|
|
"columns": [
|
|
{
|
|
"expression": "scope_type",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "scope_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"ci_by_company": {
|
|
"name": "ci_by_company",
|
|
"columns": [
|
|
{
|
|
"expression": "company_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"checklist_instances_company_id_companies_id_fk": {
|
|
"name": "checklist_instances_company_id_companies_id_fk",
|
|
"tableFrom": "checklist_instances",
|
|
"tableTo": "companies",
|
|
"columnsFrom": [
|
|
"company_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"checklist_instances_template_id_checklist_templates_id_fk": {
|
|
"name": "checklist_instances_template_id_checklist_templates_id_fk",
|
|
"tableFrom": "checklist_instances",
|
|
"tableTo": "checklist_templates",
|
|
"columnsFrom": [
|
|
"template_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"checklist_instances_created_by_users_id_fk": {
|
|
"name": "checklist_instances_created_by_users_id_fk",
|
|
"tableFrom": "checklist_instances",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"created_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.checklist_items": {
|
|
"name": "checklist_items",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"instance_id": {
|
|
"name": "instance_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"text": {
|
|
"name": "text",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"done": {
|
|
"name": "done",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"done_at": {
|
|
"name": "done_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"done_by": {
|
|
"name": "done_by",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"required": {
|
|
"name": "required",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"order": {
|
|
"name": "order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"note": {
|
|
"name": "note",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"cit_by_instance": {
|
|
"name": "cit_by_instance",
|
|
"columns": [
|
|
{
|
|
"expression": "instance_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "order",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"checklist_items_instance_id_checklist_instances_id_fk": {
|
|
"name": "checklist_items_instance_id_checklist_instances_id_fk",
|
|
"tableFrom": "checklist_items",
|
|
"tableTo": "checklist_instances",
|
|
"columnsFrom": [
|
|
"instance_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"checklist_items_done_by_users_id_fk": {
|
|
"name": "checklist_items_done_by_users_id_fk",
|
|
"tableFrom": "checklist_items",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"done_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.checklist_template_items": {
|
|
"name": "checklist_template_items",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"template_id": {
|
|
"name": "template_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"text": {
|
|
"name": "text",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"order": {
|
|
"name": "order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"required": {
|
|
"name": "required",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"cti_by_template": {
|
|
"name": "cti_by_template",
|
|
"columns": [
|
|
{
|
|
"expression": "template_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "order",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"checklist_template_items_template_id_checklist_templates_id_fk": {
|
|
"name": "checklist_template_items_template_id_checklist_templates_id_fk",
|
|
"tableFrom": "checklist_template_items",
|
|
"tableTo": "checklist_templates",
|
|
"columnsFrom": [
|
|
"template_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.checklist_templates": {
|
|
"name": "checklist_templates",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"company_id": {
|
|
"name": "company_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_by": {
|
|
"name": "created_by",
|
|
"type": "uuid",
|
|
"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": {
|
|
"ct_by_company": {
|
|
"name": "ct_by_company",
|
|
"columns": [
|
|
{
|
|
"expression": "company_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"checklist_templates_company_id_companies_id_fk": {
|
|
"name": "checklist_templates_company_id_companies_id_fk",
|
|
"tableFrom": "checklist_templates",
|
|
"tableTo": "companies",
|
|
"columnsFrom": [
|
|
"company_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"checklist_templates_created_by_users_id_fk": {
|
|
"name": "checklist_templates_created_by_users_id_fk",
|
|
"tableFrom": "checklist_templates",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"created_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.decision_events": {
|
|
"name": "decision_events",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"company_id": {
|
|
"name": "company_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"scope_type": {
|
|
"name": "scope_type",
|
|
"type": "decision_scope",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"scope_id": {
|
|
"name": "scope_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"body_md": {
|
|
"name": "body_md",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"alternatives_considered": {
|
|
"name": "alternatives_considered",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"cost_impact": {
|
|
"name": "cost_impact",
|
|
"type": "numeric(18, 4)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"currency": {
|
|
"name": "currency",
|
|
"type": "varchar(3)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"approved_by": {
|
|
"name": "approved_by",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"decided_at": {
|
|
"name": "decided_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"decided_by": {
|
|
"name": "decided_by",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"tags": {
|
|
"name": "tags",
|
|
"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()"
|
|
},
|
|
"deleted_at": {
|
|
"name": "deleted_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"de_by_scope": {
|
|
"name": "de_by_scope",
|
|
"columns": [
|
|
{
|
|
"expression": "scope_type",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "scope_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "decided_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"de_by_company": {
|
|
"name": "de_by_company",
|
|
"columns": [
|
|
{
|
|
"expression": "company_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"de_tags_gin": {
|
|
"name": "de_tags_gin",
|
|
"columns": [
|
|
{
|
|
"expression": "tags",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "gin",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"decision_events_company_id_companies_id_fk": {
|
|
"name": "decision_events_company_id_companies_id_fk",
|
|
"tableFrom": "decision_events",
|
|
"tableTo": "companies",
|
|
"columnsFrom": [
|
|
"company_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"decision_events_approved_by_users_id_fk": {
|
|
"name": "decision_events_approved_by_users_id_fk",
|
|
"tableFrom": "decision_events",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"approved_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"decision_events_decided_by_users_id_fk": {
|
|
"name": "decision_events_decided_by_users_id_fk",
|
|
"tableFrom": "decision_events",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"decided_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.documents": {
|
|
"name": "documents",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"company_id": {
|
|
"name": "company_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"scope_type": {
|
|
"name": "scope_type",
|
|
"type": "doc_scope",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"scope_id": {
|
|
"name": "scope_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"filename": {
|
|
"name": "filename",
|
|
"type": "varchar(512)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"mime_type": {
|
|
"name": "mime_type",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"size_bytes": {
|
|
"name": "size_bytes",
|
|
"type": "bigint",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"sha256": {
|
|
"name": "sha256",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"storage_key": {
|
|
"name": "storage_key",
|
|
"type": "varchar(512)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"uploaded_by": {
|
|
"name": "uploaded_by",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"uploaded_at": {
|
|
"name": "uploaded_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"docs_by_scope": {
|
|
"name": "docs_by_scope",
|
|
"columns": [
|
|
{
|
|
"expression": "scope_type",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "scope_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"docs_by_company": {
|
|
"name": "docs_by_company",
|
|
"columns": [
|
|
{
|
|
"expression": "company_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"docs_by_hash": {
|
|
"name": "docs_by_hash",
|
|
"columns": [
|
|
{
|
|
"expression": "sha256",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"docs_storage_key_uq": {
|
|
"name": "docs_storage_key_uq",
|
|
"columns": [
|
|
{
|
|
"expression": "storage_key",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"documents_company_id_companies_id_fk": {
|
|
"name": "documents_company_id_companies_id_fk",
|
|
"tableFrom": "documents",
|
|
"tableTo": "companies",
|
|
"columnsFrom": [
|
|
"company_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"documents_uploaded_by_users_id_fk": {
|
|
"name": "documents_uploaded_by_users_id_fk",
|
|
"tableFrom": "documents",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"uploaded_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.companies": {
|
|
"name": "companies",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"slug": {
|
|
"name": "slug",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"settings_json": {
|
|
"name": "settings_json",
|
|
"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()"
|
|
},
|
|
"deleted_at": {
|
|
"name": "deleted_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"companies_slug_unique": {
|
|
"name": "companies_slug_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"slug"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.company_users": {
|
|
"name": "company_users",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"company_id": {
|
|
"name": "company_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"role": {
|
|
"name": "role",
|
|
"type": "role",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'user'"
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"company_users_uq": {
|
|
"name": "company_users_uq",
|
|
"columns": [
|
|
{
|
|
"expression": "company_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"company_users_by_user": {
|
|
"name": "company_users_by_user",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"company_users_company_id_companies_id_fk": {
|
|
"name": "company_users_company_id_companies_id_fk",
|
|
"tableFrom": "company_users",
|
|
"tableTo": "companies",
|
|
"columnsFrom": [
|
|
"company_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"company_users_user_id_users_id_fk": {
|
|
"name": "company_users_user_id_users_id_fk",
|
|
"tableFrom": "company_users",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.sessions": {
|
|
"name": "sessions",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "varchar(128)",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"active_company_id": {
|
|
"name": "active_company_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"user_agent": {
|
|
"name": "user_agent",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"ip": {
|
|
"name": "ip",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"last_seen_at": {
|
|
"name": "last_seen_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"sessions_by_user": {
|
|
"name": "sessions_by_user",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"sessions_by_expiry": {
|
|
"name": "sessions_by_expiry",
|
|
"columns": [
|
|
{
|
|
"expression": "expires_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"sessions_user_id_users_id_fk": {
|
|
"name": "sessions_user_id_users_id_fk",
|
|
"tableFrom": "sessions",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"sessions_active_company_id_companies_id_fk": {
|
|
"name": "sessions_active_company_id_companies_id_fk",
|
|
"tableFrom": "sessions",
|
|
"tableTo": "companies",
|
|
"columnsFrom": [
|
|
"active_company_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.users": {
|
|
"name": "users",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "varchar(320)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"email_normalized": {
|
|
"name": "email_normalized",
|
|
"type": "varchar(320)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"display_name": {
|
|
"name": "display_name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"password_hash": {
|
|
"name": "password_hash",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"oidc_subject": {
|
|
"name": "oidc_subject",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"oidc_issuer": {
|
|
"name": "oidc_issuer",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"is_active": {
|
|
"name": "is_active",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"last_login_at": {
|
|
"name": "last_login_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()"
|
|
},
|
|
"deleted_at": {
|
|
"name": "deleted_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"users_email_norm_uq": {
|
|
"name": "users_email_norm_uq",
|
|
"columns": [
|
|
{
|
|
"expression": "email_normalized",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"users_oidc_uq": {
|
|
"name": "users_oidc_uq",
|
|
"columns": [
|
|
{
|
|
"expression": "oidc_issuer",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "oidc_subject",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.properties": {
|
|
"name": "properties",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"company_id": {
|
|
"name": "company_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"kind": {
|
|
"name": "kind",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"address_line1": {
|
|
"name": "address_line1",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"address_line2": {
|
|
"name": "address_line2",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"city": {
|
|
"name": "city",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"region": {
|
|
"name": "region",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"postal_code": {
|
|
"name": "postal_code",
|
|
"type": "varchar(32)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"country_code": {
|
|
"name": "country_code",
|
|
"type": "varchar(2)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"lat": {
|
|
"name": "lat",
|
|
"type": "numeric(9, 6)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"lng": {
|
|
"name": "lng",
|
|
"type": "numeric(9, 6)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"notes": {
|
|
"name": "notes",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_by": {
|
|
"name": "created_by",
|
|
"type": "uuid",
|
|
"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()"
|
|
},
|
|
"deleted_at": {
|
|
"name": "deleted_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"properties_by_company": {
|
|
"name": "properties_by_company",
|
|
"columns": [
|
|
{
|
|
"expression": "company_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"properties_company_id_companies_id_fk": {
|
|
"name": "properties_company_id_companies_id_fk",
|
|
"tableFrom": "properties",
|
|
"tableTo": "companies",
|
|
"columnsFrom": [
|
|
"company_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"properties_created_by_users_id_fk": {
|
|
"name": "properties_created_by_users_id_fk",
|
|
"tableFrom": "properties",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"created_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.maintenance_events": {
|
|
"name": "maintenance_events",
|
|
"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
|
|
},
|
|
"schedule_id": {
|
|
"name": "schedule_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"performed_at": {
|
|
"name": "performed_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"performed_by": {
|
|
"name": "performed_by",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"notes": {
|
|
"name": "notes",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"usage_reading": {
|
|
"name": "usage_reading",
|
|
"type": "numeric(18, 4)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"checklist_instance_id": {
|
|
"name": "checklist_instance_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"me_by_asset_time": {
|
|
"name": "me_by_asset_time",
|
|
"columns": [
|
|
{
|
|
"expression": "asset_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "performed_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"me_by_schedule": {
|
|
"name": "me_by_schedule",
|
|
"columns": [
|
|
{
|
|
"expression": "schedule_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"maintenance_events_asset_id_assets_id_fk": {
|
|
"name": "maintenance_events_asset_id_assets_id_fk",
|
|
"tableFrom": "maintenance_events",
|
|
"tableTo": "assets",
|
|
"columnsFrom": [
|
|
"asset_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"maintenance_events_schedule_id_maintenance_schedules_id_fk": {
|
|
"name": "maintenance_events_schedule_id_maintenance_schedules_id_fk",
|
|
"tableFrom": "maintenance_events",
|
|
"tableTo": "maintenance_schedules",
|
|
"columnsFrom": [
|
|
"schedule_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"maintenance_events_performed_by_users_id_fk": {
|
|
"name": "maintenance_events_performed_by_users_id_fk",
|
|
"tableFrom": "maintenance_events",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"performed_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"maintenance_events_checklist_instance_id_checklist_instances_id_fk": {
|
|
"name": "maintenance_events_checklist_instance_id_checklist_instances_id_fk",
|
|
"tableFrom": "maintenance_events",
|
|
"tableTo": "checklist_instances",
|
|
"columnsFrom": [
|
|
"checklist_instance_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.maintenance_schedules": {
|
|
"name": "maintenance_schedules",
|
|
"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
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"kind": {
|
|
"name": "kind",
|
|
"type": "schedule_kind",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"interval_value": {
|
|
"name": "interval_value",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"interval_unit": {
|
|
"name": "interval_unit",
|
|
"type": "interval_unit",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"last_serviced_at": {
|
|
"name": "last_serviced_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"next_due_at": {
|
|
"name": "next_due_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"next_due_usage": {
|
|
"name": "next_due_usage",
|
|
"type": "numeric(18, 4)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"checklist_template_id": {
|
|
"name": "checklist_template_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"active": {
|
|
"name": "active",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"notes": {
|
|
"name": "notes",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_by": {
|
|
"name": "created_by",
|
|
"type": "uuid",
|
|
"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": {
|
|
"ms_by_asset": {
|
|
"name": "ms_by_asset",
|
|
"columns": [
|
|
{
|
|
"expression": "asset_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"ms_by_next_due": {
|
|
"name": "ms_by_next_due",
|
|
"columns": [
|
|
{
|
|
"expression": "next_due_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"maintenance_schedules_asset_id_assets_id_fk": {
|
|
"name": "maintenance_schedules_asset_id_assets_id_fk",
|
|
"tableFrom": "maintenance_schedules",
|
|
"tableTo": "assets",
|
|
"columnsFrom": [
|
|
"asset_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"maintenance_schedules_checklist_template_id_checklist_templates_id_fk": {
|
|
"name": "maintenance_schedules_checklist_template_id_checklist_templates_id_fk",
|
|
"tableFrom": "maintenance_schedules",
|
|
"tableTo": "checklist_templates",
|
|
"columnsFrom": [
|
|
"checklist_template_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"maintenance_schedules_created_by_users_id_fk": {
|
|
"name": "maintenance_schedules_created_by_users_id_fk",
|
|
"tableFrom": "maintenance_schedules",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"created_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.usage_readings": {
|
|
"name": "usage_readings",
|
|
"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
|
|
},
|
|
"reading": {
|
|
"name": "reading",
|
|
"type": "numeric(18, 4)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"unit": {
|
|
"name": "unit",
|
|
"type": "interval_unit",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"recorded_at": {
|
|
"name": "recorded_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"recorded_by": {
|
|
"name": "recorded_by",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"notes": {
|
|
"name": "notes",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"ur_by_asset_time": {
|
|
"name": "ur_by_asset_time",
|
|
"columns": [
|
|
{
|
|
"expression": "asset_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "recorded_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"usage_readings_asset_id_assets_id_fk": {
|
|
"name": "usage_readings_asset_id_assets_id_fk",
|
|
"tableFrom": "usage_readings",
|
|
"tableTo": "assets",
|
|
"columnsFrom": [
|
|
"asset_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"usage_readings_recorded_by_users_id_fk": {
|
|
"name": "usage_readings_recorded_by_users_id_fk",
|
|
"tableFrom": "usage_readings",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"recorded_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.projects": {
|
|
"name": "projects",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"company_id": {
|
|
"name": "company_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"code": {
|
|
"name": "code",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "varchar(32)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'active'"
|
|
},
|
|
"start_date": {
|
|
"name": "start_date",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"end_date": {
|
|
"name": "end_date",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_by": {
|
|
"name": "created_by",
|
|
"type": "uuid",
|
|
"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()"
|
|
},
|
|
"deleted_at": {
|
|
"name": "deleted_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"projects_by_company": {
|
|
"name": "projects_by_company",
|
|
"columns": [
|
|
{
|
|
"expression": "company_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"projects_company_code_uq": {
|
|
"name": "projects_company_code_uq",
|
|
"columns": [
|
|
{
|
|
"expression": "company_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "code",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"projects_company_id_companies_id_fk": {
|
|
"name": "projects_company_id_companies_id_fk",
|
|
"tableFrom": "projects",
|
|
"tableTo": "companies",
|
|
"columnsFrom": [
|
|
"company_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"projects_created_by_users_id_fk": {
|
|
"name": "projects_created_by_users_id_fk",
|
|
"tableFrom": "projects",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"created_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.subtasks": {
|
|
"name": "subtasks",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"task_id": {
|
|
"name": "task_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"done": {
|
|
"name": "done",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"order": {
|
|
"name": "order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"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": {
|
|
"subtasks_by_task": {
|
|
"name": "subtasks_by_task",
|
|
"columns": [
|
|
{
|
|
"expression": "task_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "order",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"subtasks_task_id_tasks_id_fk": {
|
|
"name": "subtasks_task_id_tasks_id_fk",
|
|
"tableFrom": "subtasks",
|
|
"tableTo": "tasks",
|
|
"columnsFrom": [
|
|
"task_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.tasks": {
|
|
"name": "tasks",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"work_package_id": {
|
|
"name": "work_package_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "task_status",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'todo'"
|
|
},
|
|
"assignee_id": {
|
|
"name": "assignee_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"due_at": {
|
|
"name": "due_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"order": {
|
|
"name": "order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"completed_at": {
|
|
"name": "completed_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_by": {
|
|
"name": "created_by",
|
|
"type": "uuid",
|
|
"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()"
|
|
},
|
|
"deleted_at": {
|
|
"name": "deleted_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"tasks_by_wp": {
|
|
"name": "tasks_by_wp",
|
|
"columns": [
|
|
{
|
|
"expression": "work_package_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"tasks_by_assignee": {
|
|
"name": "tasks_by_assignee",
|
|
"columns": [
|
|
{
|
|
"expression": "assignee_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"tasks_status_due": {
|
|
"name": "tasks_status_due",
|
|
"columns": [
|
|
{
|
|
"expression": "status",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "due_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"tasks_work_package_id_work_packages_id_fk": {
|
|
"name": "tasks_work_package_id_work_packages_id_fk",
|
|
"tableFrom": "tasks",
|
|
"tableTo": "work_packages",
|
|
"columnsFrom": [
|
|
"work_package_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"tasks_assignee_id_users_id_fk": {
|
|
"name": "tasks_assignee_id_users_id_fk",
|
|
"tableFrom": "tasks",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"assignee_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"tasks_created_by_users_id_fk": {
|
|
"name": "tasks_created_by_users_id_fk",
|
|
"tableFrom": "tasks",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"created_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.work_packages": {
|
|
"name": "work_packages",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"project_id": {
|
|
"name": "project_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"order": {
|
|
"name": "order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"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()"
|
|
},
|
|
"deleted_at": {
|
|
"name": "deleted_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"work_packages_by_project": {
|
|
"name": "work_packages_by_project",
|
|
"columns": [
|
|
{
|
|
"expression": "project_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"work_packages_project_id_projects_id_fk": {
|
|
"name": "work_packages_project_id_projects_id_fk",
|
|
"tableFrom": "work_packages",
|
|
"tableTo": "projects",
|
|
"columnsFrom": [
|
|
"project_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
}
|
|
},
|
|
"enums": {
|
|
"public.audit_action": {
|
|
"name": "audit_action",
|
|
"schema": "public",
|
|
"values": [
|
|
"create",
|
|
"update",
|
|
"delete",
|
|
"move",
|
|
"assign",
|
|
"complete",
|
|
"login",
|
|
"logout"
|
|
]
|
|
},
|
|
"public.checklist_scope": {
|
|
"name": "checklist_scope",
|
|
"schema": "public",
|
|
"values": [
|
|
"task",
|
|
"subtask",
|
|
"maintenance_event",
|
|
"ad_hoc"
|
|
]
|
|
},
|
|
"public.container_kind": {
|
|
"name": "container_kind",
|
|
"schema": "public",
|
|
"values": [
|
|
"project",
|
|
"property"
|
|
]
|
|
},
|
|
"public.decision_scope": {
|
|
"name": "decision_scope",
|
|
"schema": "public",
|
|
"values": [
|
|
"project",
|
|
"property",
|
|
"asset",
|
|
"work_package"
|
|
]
|
|
},
|
|
"public.doc_scope": {
|
|
"name": "doc_scope",
|
|
"schema": "public",
|
|
"values": [
|
|
"project",
|
|
"property",
|
|
"asset",
|
|
"work_package",
|
|
"decision_event"
|
|
]
|
|
},
|
|
"public.field_type": {
|
|
"name": "field_type",
|
|
"schema": "public",
|
|
"values": [
|
|
"text",
|
|
"textarea",
|
|
"int",
|
|
"float",
|
|
"bool",
|
|
"date",
|
|
"ip",
|
|
"cidr",
|
|
"mac",
|
|
"enum",
|
|
"multi_enum",
|
|
"url",
|
|
"email",
|
|
"asset_ref"
|
|
]
|
|
},
|
|
"public.interval_unit": {
|
|
"name": "interval_unit",
|
|
"schema": "public",
|
|
"values": [
|
|
"days",
|
|
"months",
|
|
"years",
|
|
"hours",
|
|
"cycles",
|
|
"km"
|
|
]
|
|
},
|
|
"public.role": {
|
|
"name": "role",
|
|
"schema": "public",
|
|
"values": [
|
|
"admin",
|
|
"manager",
|
|
"user",
|
|
"viewer"
|
|
]
|
|
},
|
|
"public.schedule_kind": {
|
|
"name": "schedule_kind",
|
|
"schema": "public",
|
|
"values": [
|
|
"time",
|
|
"usage"
|
|
]
|
|
},
|
|
"public.task_status": {
|
|
"name": "task_status",
|
|
"schema": "public",
|
|
"values": [
|
|
"todo",
|
|
"doing",
|
|
"done",
|
|
"blocked"
|
|
]
|
|
},
|
|
"public.wiki_scope": {
|
|
"name": "wiki_scope",
|
|
"schema": "public",
|
|
"values": [
|
|
"global",
|
|
"project",
|
|
"property"
|
|
]
|
|
}
|
|
},
|
|
"schemas": {},
|
|
"sequences": {},
|
|
"roles": {},
|
|
"policies": {},
|
|
"views": {},
|
|
"_meta": {
|
|
"columns": {},
|
|
"schemas": {},
|
|
"tables": {}
|
|
}
|
|
} |