Skip to content

Profile schema ​

DbConnection ​

json
{
  "id": "0f0c2f7e-...",
  "name": "Analytics",
  "engine": "postgres",
  "host": "analytics.example.com",
  "port": 5432,
  "database": "analytics",
  "username": "analyst",
  "useSsl": true,
  "target": "unknown"
}
FieldTypeNotes
idstringStable; the keyring account
namestringDisplay name
enginemysql | postgresLowercase
hoststringHostname or IP
portnumber1–65535
databasestringDatabase name
usernamestringDatabase user
useSslbooleanStored; not currently applied to connections
targetproduction | staging | local | unknownUser hint only

StoreFile ​

json
{
  "version": 1,
  "migratedFrom": "localStorage@v1",
  "migrationReport": {
    "imported": 2,
    "skippedInvalid": [],
    "skippedDuplicates": 0,
    "skippedConflicts": []
  },
  "revision": 7,
  "connections": []
}
FieldTypeNotes
versionnumberMust be 1
migratedFromstring?Provenance, written once
migrationReportobject?Last migration result
revisionnumberMonotonic write counter
connectionsarrayThe profiles

ImportReport ​

FieldTypeMeaning
importednumberRecords added
skippedInvalidarray{ index, reason }
skippedDuplicatesnumberRecords already present
skippedConflictsarray{ index, id, reason }

Validation rules ​

A record is rejected when:

  • id is empty;
  • name is empty;
  • host is empty;
  • database is empty;
  • username is empty;
  • port is 0.

Deduplication ​

Two records are the same profile when engine, host, port, database and username all match. A record with an existing id but different details is a conflict: the shared record wins and the import is reported.

Released under the MIT License.