{
  "id": "37e33295-8bda-4c0c-933c-7fb2b6207c5b",
  "prevId": "aa498a85-b598-4f0e-8631-f15e1de6dee4",
  "version": "7",
  "dialect": "postgresql",
  "tables": {
    "public.accounts": {
      "name": "accounts",
      "schema": "",
      "columns": {
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "provider": {
          "name": "provider",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "provider_account_id": {
          "name": "provider_account_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "refresh_token": {
          "name": "refresh_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "access_token": {
          "name": "access_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "expires_at": {
          "name": "expires_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "token_type": {
          "name": "token_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "scope": {
          "name": "scope",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "id_token": {
          "name": "id_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "session_state": {
          "name": "session_state",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "accounts_user_id_users_id_fk": {
          "name": "accounts_user_id_users_id_fk",
          "tableFrom": "accounts",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "accounts_provider_provider_account_id_pk": {
          "name": "accounts_provider_provider_account_id_pk",
          "columns": [
            "provider",
            "provider_account_id"
          ]
        }
      },
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.admin_audit": {
      "name": "admin_audit",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "admin_user_id": {
          "name": "admin_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "action": {
          "name": "action",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "target_id": {
          "name": "target_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "metadata": {
          "name": "metadata",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "admin_audit_admin_user_id_users_id_fk": {
          "name": "admin_audit_admin_user_id_users_id_fk",
          "tableFrom": "admin_audit",
          "tableTo": "users",
          "columnsFrom": [
            "admin_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.admin_settings": {
      "name": "admin_settings",
      "schema": "",
      "columns": {
        "key": {
          "name": "key",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "value": {
          "name": "value",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_by": {
          "name": "updated_by",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "admin_settings_updated_by_users_id_fk": {
          "name": "admin_settings_updated_by_users_id_fk",
          "tableFrom": "admin_settings",
          "tableTo": "users",
          "columnsFrom": [
            "updated_by"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.applications": {
      "name": "applications",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "motivation_text": {
          "name": "motivation_text",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "application_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "reviewed_by": {
          "name": "reviewed_by",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "reviewed_at": {
          "name": "reviewed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "review_notes": {
          "name": "review_notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "applications_user_id_users_id_fk": {
          "name": "applications_user_id_users_id_fk",
          "tableFrom": "applications",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.blog_posts": {
      "name": "blog_posts",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "slug": {
          "name": "slug",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "excerpt": {
          "name": "excerpt",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "content": {
          "name": "content",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "cover_image": {
          "name": "cover_image",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "cover_image_alt": {
          "name": "cover_image_alt",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "author_user_id": {
          "name": "author_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "author_name": {
          "name": "author_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "tags": {
          "name": "tags",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "status": {
          "name": "status",
          "type": "blog_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'draft'"
        },
        "published_at": {
          "name": "published_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "scheduled_at": {
          "name": "scheduled_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "blog_posts_slug_idx": {
          "name": "blog_posts_slug_idx",
          "columns": [
            {
              "expression": "slug",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "blog_posts_status_idx": {
          "name": "blog_posts_status_idx",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "blog_posts_author_user_id_users_id_fk": {
          "name": "blog_posts_author_user_id_users_id_fk",
          "tableFrom": "blog_posts",
          "tableTo": "users",
          "columnsFrom": [
            "author_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.consentiq_procedures": {
      "name": "consentiq_procedures",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "slug": {
          "name": "slug",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "region": {
          "name": "region",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "approx_duration_min": {
          "name": "approx_duration_min",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "anaesthesia": {
          "name": "anaesthesia",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "summary": {
          "name": "summary",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "involves": {
          "name": "involves",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "options": {
          "name": "options",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "risks": {
          "name": "risks",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "benefits": {
          "name": "benefits",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "alternatives": {
          "name": "alternatives",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "recovery": {
          "name": "recovery",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "warnings": {
          "name": "warnings",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "status": {
          "name": "status",
          "type": "consent_procedure_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'draft'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "consentiq_procedures_slug_idx": {
          "name": "consentiq_procedures_slug_idx",
          "columns": [
            {
              "expression": "slug",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "consentiq_procedures_status_idx": {
          "name": "consentiq_procedures_status_idx",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "consentiq_procedures_region_idx": {
          "name": "consentiq_procedures_region_idx",
          "columns": [
            {
              "expression": "region",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.course_modules": {
      "name": "course_modules",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "course_id": {
          "name": "course_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "course_modules_course_idx": {
          "name": "course_modules_course_idx",
          "columns": [
            {
              "expression": "course_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "course_modules_course_id_courses_id_fk": {
          "name": "course_modules_course_id_courses_id_fk",
          "tableFrom": "course_modules",
          "tableTo": "courses",
          "columnsFrom": [
            "course_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.course_resources": {
      "name": "course_resources",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "course_id": {
          "name": "course_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "lesson_id": {
          "name": "lesson_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "type": {
          "name": "type",
          "type": "course_resource_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'link'"
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "url": {
          "name": "url",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "file_size": {
          "name": "file_size",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "mime_type": {
          "name": "mime_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "course_resources_course_idx": {
          "name": "course_resources_course_idx",
          "columns": [
            {
              "expression": "course_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "course_resources_lesson_idx": {
          "name": "course_resources_lesson_idx",
          "columns": [
            {
              "expression": "lesson_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "course_resources_course_id_courses_id_fk": {
          "name": "course_resources_course_id_courses_id_fk",
          "tableFrom": "course_resources",
          "tableTo": "courses",
          "columnsFrom": [
            "course_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "course_resources_lesson_id_lessons_id_fk": {
          "name": "course_resources_lesson_id_lessons_id_fk",
          "tableFrom": "course_resources",
          "tableTo": "lessons",
          "columnsFrom": [
            "lesson_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.courses": {
      "name": "courses",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "slug": {
          "name": "slug",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "level": {
          "name": "level",
          "type": "course_level",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'Foundation'"
        },
        "topic": {
          "name": "topic",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'General'"
        },
        "short_description": {
          "name": "short_description",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "outcomes": {
          "name": "outcomes",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "prerequisites": {
          "name": "prerequisites",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "instructor_name": {
          "name": "instructor_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "instructor_title": {
          "name": "instructor_title",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "instructor_bio": {
          "name": "instructor_bio",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "cover_photo": {
          "name": "cover_photo",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "cover_photo_alt": {
          "name": "cover_photo_alt",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "course_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'draft'"
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "published_at": {
          "name": "published_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "courses_slug_idx": {
          "name": "courses_slug_idx",
          "columns": [
            {
              "expression": "slug",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "courses_status_idx": {
          "name": "courses_status_idx",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.enrollments": {
      "name": "enrollments",
      "schema": "",
      "columns": {
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "course_id": {
          "name": "course_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "enrolled_at": {
          "name": "enrolled_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "enrollments_user_id_users_id_fk": {
          "name": "enrollments_user_id_users_id_fk",
          "tableFrom": "enrollments",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "enrollments_course_id_courses_id_fk": {
          "name": "enrollments_course_id_courses_id_fk",
          "tableFrom": "enrollments",
          "tableTo": "courses",
          "columnsFrom": [
            "course_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "enrollments_user_id_course_id_pk": {
          "name": "enrollments_user_id_course_id_pk",
          "columns": [
            "user_id",
            "course_id"
          ]
        }
      },
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.lesson_progress": {
      "name": "lesson_progress",
      "schema": "",
      "columns": {
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "lesson_id": {
          "name": "lesson_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "lesson_progress_user_id_users_id_fk": {
          "name": "lesson_progress_user_id_users_id_fk",
          "tableFrom": "lesson_progress",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "lesson_progress_lesson_id_lessons_id_fk": {
          "name": "lesson_progress_lesson_id_lessons_id_fk",
          "tableFrom": "lesson_progress",
          "tableTo": "lessons",
          "columnsFrom": [
            "lesson_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "lesson_progress_user_id_lesson_id_pk": {
          "name": "lesson_progress_user_id_lesson_id_pk",
          "columns": [
            "user_id",
            "lesson_id"
          ]
        }
      },
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.lessons": {
      "name": "lessons",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "module_id": {
          "name": "module_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "slug": {
          "name": "slug",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "lesson_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'reading'"
        },
        "duration_min": {
          "name": "duration_min",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "content": {
          "name": "content",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "transcript": {
          "name": "transcript",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "key_points": {
          "name": "key_points",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "video_provider": {
          "name": "video_provider",
          "type": "video_provider",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'none'"
        },
        "video_url": {
          "name": "video_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "video_poster": {
          "name": "video_poster",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "lessons_module_slug_idx": {
          "name": "lessons_module_slug_idx",
          "columns": [
            {
              "expression": "module_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "slug",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "lessons_module_id_course_modules_id_fk": {
          "name": "lessons_module_id_course_modules_id_fk",
          "tableFrom": "lessons",
          "tableTo": "course_modules",
          "columnsFrom": [
            "module_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.notifications": {
      "name": "notifications",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "body": {
          "name": "body",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "href": {
          "name": "href",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "level": {
          "name": "level",
          "type": "notification_level",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'info'"
        },
        "active": {
          "name": "active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "starts_at": {
          "name": "starts_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "ends_at": {
          "name": "ends_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "notifications_active_idx": {
          "name": "notifications_active_idx",
          "columns": [
            {
              "expression": "active",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.orthoprep_questions": {
      "name": "orthoprep_questions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "number": {
          "name": "number",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "part": {
          "name": "part",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "chapter": {
          "name": "chapter",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "stem": {
          "name": "stem",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "options": {
          "name": "options",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "answer": {
          "name": "answer",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'A'"
        },
        "explanation": {
          "name": "explanation",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "distractors": {
          "name": "distractors",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "take_home": {
          "name": "take_home",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "difficulty": {
          "name": "difficulty",
          "type": "question_difficulty",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'Medium'"
        },
        "tags": {
          "name": "tags",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "status": {
          "name": "status",
          "type": "question_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'draft'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "orthoprep_questions_number_idx": {
          "name": "orthoprep_questions_number_idx",
          "columns": [
            {
              "expression": "number",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "orthoprep_questions_status_idx": {
          "name": "orthoprep_questions_status_idx",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "orthoprep_questions_part_idx": {
          "name": "orthoprep_questions_part_idx",
          "columns": [
            {
              "expression": "part",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.product_pages": {
      "name": "product_pages",
      "schema": "",
      "columns": {
        "slug": {
          "name": "slug",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "hero_eyebrow": {
          "name": "hero_eyebrow",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "hero_title": {
          "name": "hero_title",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "hero_tagline": {
          "name": "hero_tagline",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "hero_description": {
          "name": "hero_description",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "hero_image_path": {
          "name": "hero_image_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "hero_image_alt": {
          "name": "hero_image_alt",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "hero_primary_cta_label": {
          "name": "hero_primary_cta_label",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "hero_primary_cta_href": {
          "name": "hero_primary_cta_href",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "hero_secondary_cta_label": {
          "name": "hero_secondary_cta_label",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "hero_secondary_cta_href": {
          "name": "hero_secondary_cta_href",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "access_rail_tagline": {
          "name": "access_rail_tagline",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "access_rail_members_only": {
          "name": "access_rail_members_only",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "access_tiles": {
          "name": "access_tiles",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "section_eyebrow": {
          "name": "section_eyebrow",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "section_heading": {
          "name": "section_heading",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "section_body": {
          "name": "section_body",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "showcase_image_path": {
          "name": "showcase_image_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "showcase_image_alt": {
          "name": "showcase_image_alt",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "showcase_eyebrow": {
          "name": "showcase_eyebrow",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "showcase_caption": {
          "name": "showcase_caption",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "features": {
          "name": "features",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "audience_heading": {
          "name": "audience_heading",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "audience_body": {
          "name": "audience_body",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "audiences": {
          "name": "audiences",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "faqs": {
          "name": "faqs",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "cta_title": {
          "name": "cta_title",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "cta_body": {
          "name": "cta_body",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "cta_primary_label": {
          "name": "cta_primary_label",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "cta_primary_href": {
          "name": "cta_primary_href",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "cta_secondary_label": {
          "name": "cta_secondary_label",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "cta_secondary_href": {
          "name": "cta_secondary_href",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "custom_sections": {
          "name": "custom_sections",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_by": {
          "name": "updated_by",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "product_pages_updated_by_users_id_fk": {
          "name": "product_pages_updated_by_users_id_fk",
          "tableFrom": "product_pages",
          "tableTo": "users",
          "columnsFrom": [
            "updated_by"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.research_documents": {
      "name": "research_documents",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "study_id": {
          "name": "study_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "url": {
          "name": "url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        }
      },
      "indexes": {
        "research_documents_study_idx": {
          "name": "research_documents_study_idx",
          "columns": [
            {
              "expression": "study_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "research_documents_study_id_research_studies_id_fk": {
          "name": "research_documents_study_id_research_studies_id_fk",
          "tableFrom": "research_documents",
          "tableTo": "research_studies",
          "columnsFrom": [
            "study_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.research_investigators": {
      "name": "research_investigators",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "study_id": {
          "name": "study_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "institution": {
          "name": "institution",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "role": {
          "name": "role",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        }
      },
      "indexes": {
        "research_investigators_study_idx": {
          "name": "research_investigators_study_idx",
          "columns": [
            {
              "expression": "study_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "research_investigators_study_id_research_studies_id_fk": {
          "name": "research_investigators_study_id_research_studies_id_fk",
          "tableFrom": "research_investigators",
          "tableTo": "research_studies",
          "columnsFrom": [
            "study_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.research_sites": {
      "name": "research_sites",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "study_id": {
          "name": "study_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "city": {
          "name": "city",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "country": {
          "name": "country",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "pi_name": {
          "name": "pi_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "enrolment": {
          "name": "enrolment",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        }
      },
      "indexes": {
        "research_sites_study_idx": {
          "name": "research_sites_study_idx",
          "columns": [
            {
              "expression": "study_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "research_sites_study_id_research_studies_id_fk": {
          "name": "research_sites_study_id_research_studies_id_fk",
          "tableFrom": "research_sites",
          "tableTo": "research_studies",
          "columnsFrom": [
            "study_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.research_studies": {
      "name": "research_studies",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "slug": {
          "name": "slug",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "phase": {
          "name": "phase",
          "type": "study_phase",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'Planned'"
        },
        "nct_id": {
          "name": "nct_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "sponsor": {
          "name": "sponsor",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'OrthoGlobe Research Collaborative'"
        },
        "principal_investigator": {
          "name": "principal_investigator",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "condition_keyword": {
          "name": "condition_keyword",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "target_enrolment": {
          "name": "target_enrolment",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "current_enrolment": {
          "name": "current_enrolment",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "countries": {
          "name": "countries",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "background": {
          "name": "background",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "design": {
          "name": "design",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "intervention": {
          "name": "intervention",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "control": {
          "name": "control",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "inclusion": {
          "name": "inclusion",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "exclusion": {
          "name": "exclusion",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "primary_outcomes": {
          "name": "primary_outcomes",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "secondary_outcomes": {
          "name": "secondary_outcomes",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "status": {
          "name": "status",
          "type": "study_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'draft'"
        },
        "is_recruiting_collaborators": {
          "name": "is_recruiting_collaborators",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "collaboration_email": {
          "name": "collaboration_email",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "authorship_opportunities": {
          "name": "authorship_opportunities",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "open_roles": {
          "name": "open_roles",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "published_at": {
          "name": "published_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "research_studies_slug_idx": {
          "name": "research_studies_slug_idx",
          "columns": [
            {
              "expression": "slug",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "research_studies_status_idx": {
          "name": "research_studies_status_idx",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.sessions": {
      "name": "sessions",
      "schema": "",
      "columns": {
        "session_token": {
          "name": "session_token",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "expires": {
          "name": "expires",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {},
      "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"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.store_categories": {
      "name": "store_categories",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "slug": {
          "name": "slug",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "store_categories_slug_idx": {
          "name": "store_categories_slug_idx",
          "columns": [
            {
              "expression": "slug",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.store_products": {
      "name": "store_products",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "slug": {
          "name": "slug",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "short_description": {
          "name": "short_description",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "category_id": {
          "name": "category_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "price_minor": {
          "name": "price_minor",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "currency": {
          "name": "currency",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'GBP'"
        },
        "sku": {
          "name": "sku",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "stock_status": {
          "name": "stock_status",
          "type": "stock_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'coming_soon'"
        },
        "cover_image": {
          "name": "cover_image",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "cover_image_alt": {
          "name": "cover_image_alt",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "gallery": {
          "name": "gallery",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "member_only": {
          "name": "member_only",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "status": {
          "name": "status",
          "type": "product_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'draft'"
        },
        "published_at": {
          "name": "published_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "store_products_slug_idx": {
          "name": "store_products_slug_idx",
          "columns": [
            {
              "expression": "slug",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "store_products_status_idx": {
          "name": "store_products_status_idx",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "store_products_category_id_store_categories_id_fk": {
          "name": "store_products_category_id_store_categories_id_fk",
          "tableFrom": "store_products",
          "tableTo": "store_categories",
          "columnsFrom": [
            "category_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.team_members": {
      "name": "team_members",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "slug": {
          "name": "slug",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "role": {
          "name": "role",
          "type": "team_role",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'contributor'"
        },
        "bio": {
          "name": "bio",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "photo": {
          "name": "photo",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "photo_alt": {
          "name": "photo_alt",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "country": {
          "name": "country",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "institution": {
          "name": "institution",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "orcid_url": {
          "name": "orcid_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "linkedin_url": {
          "name": "linkedin_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "website_url": {
          "name": "website_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "status": {
          "name": "status",
          "type": "team_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'active'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "team_members_slug_idx": {
          "name": "team_members_slug_idx",
          "columns": [
            {
              "expression": "slug",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "team_members_status_idx": {
          "name": "team_members_status_idx",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "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": "text",
          "primaryKey": false,
          "notNull": true
        },
        "email_verified": {
          "name": "email_verified",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "password_hash": {
          "name": "password_hash",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "country": {
          "name": "country",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "institution": {
          "name": "institution",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "professional_role": {
          "name": "professional_role",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "orcid_url": {
          "name": "orcid_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "linkedin_url": {
          "name": "linkedin_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "user_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "role": {
          "name": "role",
          "type": "user_role",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'user'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "approved_at": {
          "name": "approved_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "approved_by": {
          "name": "approved_by",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "image": {
          "name": "image",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "users_email_unique": {
          "name": "users_email_unique",
          "nullsNotDistinct": false,
          "columns": [
            "email"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.verification_tokens": {
      "name": "verification_tokens",
      "schema": "",
      "columns": {
        "identifier": {
          "name": "identifier",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "token": {
          "name": "token",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "expires": {
          "name": "expires",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {
        "verification_tokens_identifier_token_pk": {
          "name": "verification_tokens_identifier_token_pk",
          "columns": [
            "identifier",
            "token"
          ]
        }
      },
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    }
  },
  "enums": {
    "public.application_status": {
      "name": "application_status",
      "schema": "public",
      "values": [
        "pending",
        "approved",
        "rejected",
        "withdrawn"
      ]
    },
    "public.blog_status": {
      "name": "blog_status",
      "schema": "public",
      "values": [
        "draft",
        "published",
        "archived"
      ]
    },
    "public.consent_procedure_status": {
      "name": "consent_procedure_status",
      "schema": "public",
      "values": [
        "draft",
        "published",
        "archived"
      ]
    },
    "public.course_level": {
      "name": "course_level",
      "schema": "public",
      "values": [
        "Foundation",
        "Intermediate",
        "Advanced"
      ]
    },
    "public.course_resource_type": {
      "name": "course_resource_type",
      "schema": "public",
      "values": [
        "pdf",
        "poster",
        "slide_deck",
        "article",
        "link",
        "image",
        "video",
        "other"
      ]
    },
    "public.course_status": {
      "name": "course_status",
      "schema": "public",
      "values": [
        "draft",
        "published",
        "archived"
      ]
    },
    "public.lesson_type": {
      "name": "lesson_type",
      "schema": "public",
      "values": [
        "video",
        "reading",
        "quiz"
      ]
    },
    "public.notification_level": {
      "name": "notification_level",
      "schema": "public",
      "values": [
        "info",
        "warning",
        "success"
      ]
    },
    "public.product_status": {
      "name": "product_status",
      "schema": "public",
      "values": [
        "draft",
        "published",
        "archived"
      ]
    },
    "public.question_difficulty": {
      "name": "question_difficulty",
      "schema": "public",
      "values": [
        "Easy",
        "Medium",
        "Hard"
      ]
    },
    "public.question_status": {
      "name": "question_status",
      "schema": "public",
      "values": [
        "draft",
        "published",
        "archived"
      ]
    },
    "public.stock_status": {
      "name": "stock_status",
      "schema": "public",
      "values": [
        "in_stock",
        "out_of_stock",
        "preorder",
        "coming_soon"
      ]
    },
    "public.study_phase": {
      "name": "study_phase",
      "schema": "public",
      "values": [
        "Planned",
        "Recruiting",
        "Active",
        "Completed"
      ]
    },
    "public.study_status": {
      "name": "study_status",
      "schema": "public",
      "values": [
        "draft",
        "published",
        "archived"
      ]
    },
    "public.team_role": {
      "name": "team_role",
      "schema": "public",
      "values": [
        "lead",
        "committee",
        "contributor"
      ]
    },
    "public.team_status": {
      "name": "team_status",
      "schema": "public",
      "values": [
        "active",
        "archived"
      ]
    },
    "public.user_role": {
      "name": "user_role",
      "schema": "public",
      "values": [
        "user",
        "admin"
      ]
    },
    "public.user_status": {
      "name": "user_status",
      "schema": "public",
      "values": [
        "pending",
        "active",
        "rejected",
        "suspended"
      ]
    },
    "public.video_provider": {
      "name": "video_provider",
      "schema": "public",
      "values": [
        "youtube",
        "vimeo",
        "mp4",
        "none"
      ]
    }
  },
  "schemas": {},
  "sequences": {},
  "roles": {},
  "policies": {},
  "views": {},
  "_meta": {
    "columns": {},
    "schemas": {},
    "tables": {}
  }
}