Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
Links to PSHealth (now Mobisio) worker records
| Column | Type | Null | Default | Comment |
|---|---|---|---|---|
| psHealthPersonID | char(20) | NOT NULL | ||
| personid | char(20) | NOT NULL | ||
| transferbatch | smallint | NOT NULL | 0 | |
| recipientflag | char(1) | NULL | ||
| tenantCustomerId | char(20) | NULL | Person appnumber | |
| tenantCarerId | char(20) | NULL | Person appnumber | |
| tenantBranchId | char(20) | NULL | ||
| pin | char(20) | NULL | ||
| username | char(50) | NULL | ||
| title | char(50) | NULL | ||
| firstName | char(50) | NULL | ||
| lastName | char(50) | NULL | ||
| char(50) | NULL | |||
| primaryTelephone | char(50) | NULL | ||
| secondaryTelephone | char(50) | NULL | ||
| dateOfBirth | timestamp | NULL | ||
| gender | char(50) | NULL | ||
| addressLineOne | char(50) | NULL | ||
| addressLineTwo | char(50) | NULL | ||
| addressCity | char(50) | NULL | ||
| addressPostcode | char(50) | NULL | ||
| addressCounty | char(50) | NULL | ||
| addressCountry | char(50) | NULL | ||
| addressLatitude | double | NULL | ||
| addressLongitude | double | NULL | ||
| team | char(50) | NULL | ||
| nfcTag | char(50) | NULL | ||
| location | char(50) | NULL | ||
| isActive | smallint | NULL | check if 1 or 0 or null or true or false | |
| loginsent | smallint | NOT NULL | 0 |
| Constraint | Columns | References | Delete/update action |
|---|---|---|---|
| Person | personid | pears.Person (personid) | NOT NULL; ON DELETE CASCADE |
-- IQX database structure split by table -- Source: IQXDatabaseStructure - with comments.sql -- Table: "pears"."psHealthPerson" -- Table comment: Links to PSHealth (now Mobisio) worker records -- Statement count: 6 CREATE TABLE "pears"."psHealthPerson" ( "psHealthPersonID" CHAR(20) NOT NULL ,"personid" CHAR(20) NOT NULL ,"transferbatch" SMALLINT NOT NULL DEFAULT 0 ,"recipientflag" CHAR(1) NULL ,"tenantCustomerId" CHAR(20) NULL ,"tenantCarerId" CHAR(20) NULL ,"tenantBranchId" CHAR(20) NULL ,"pin" CHAR(20) NULL ,"username" CHAR(50) NULL ,"title" CHAR(50) NULL ,"firstName" CHAR(50) NULL ,"lastName" CHAR(50) NULL ,"email" CHAR(50) NULL ,"primaryTelephone" CHAR(50) NULL ,"secondaryTelephone" CHAR(50) NULL ,"dateOfBirth" TIMESTAMP NULL ,"gender" CHAR(50) NULL ,"addressLineOne" CHAR(50) NULL ,"addressLineTwo" CHAR(50) NULL ,"addressCity" CHAR(50) NULL ,"addressPostcode" CHAR(50) NULL ,"addressCounty" CHAR(50) NULL ,"addressCountry" CHAR(50) NULL ,"addressLatitude" DOUBLE NULL ,"addressLongitude" DOUBLE NULL ,"team" CHAR(50) NULL ,"nfcTag" CHAR(50) NULL ,"location" CHAR(50) NULL ,"isActive" SMALLINT NULL ,"loginsent" SMALLINT NOT NULL DEFAULT 0 ,PRIMARY KEY ("psHealthPersonID" ASC) ) GO COMMENT ON COLUMN "pears"."psHealthPerson"."tenantCustomerId" IS 'Person appnumber' GO COMMENT ON COLUMN "pears"."psHealthPerson"."tenantCarerId" IS 'Person appnumber' GO COMMENT ON COLUMN "pears"."psHealthPerson"."isActive" IS 'check if 1 or 0 or null or true or false' GO COMMENT ON TABLE "pears"."psHealthPerson" IS 'Links to PSHealth (now Mobisio) worker records' GO ALTER TABLE "pears"."psHealthPerson" ADD NOT NULL FOREIGN KEY "Person" ("personid" ASC) REFERENCES "pears"."Person" ("personid") ON DELETE CASCADE GO