- `content_key`, a synced table in the person's space, keeps their data keys sealed to their account (a private studyset's, their personal one); `learning_path_answer` gains `keyId` and `nonce` for answers in private studysets. Additive only, on the server and the device. - Publishing refuses a private studyset, and a tree holding a private row (`PublishRefusal.private`); a private studyset elsewhere no longer breaks publishing a readable one. Encrypted tags are named as the device names them (`tagNames`): a name for a tag that isn't the person's, or an encrypted tag of the release without one, refuses it (`tagNamesMismatch`); a readable tag keeps its own name. - The connector leaves private studysets out and says how many there are. - The learner count reads no payload any more: Count me is kept by the instance (`counted_learner`) and the device reports which publications its copies come from (`learning_copy`, accepted only while counted, each report replacing the last); only the reporter's own studysets count. Deleting a person deletes both. - An upload says whether its file is encrypted: only a readable one over 20 MB is checked to be a PDF, and an encrypted one may be 4 KiB larger. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
144 lines
No EOL
4.1 KiB
JSON
144 lines
No EOL
4.1 KiB
JSON
{
|
|
"__className__": "serverpod.DatabaseMigration",
|
|
"actions": [
|
|
{
|
|
"__className__": "serverpod.DatabaseMigrationAction",
|
|
"type": "createTable",
|
|
"createTable": {
|
|
"__className__": "serverpod.TableDefinition",
|
|
"name": "content_key",
|
|
"dartName": "ContentKey",
|
|
"module": "halkyon_learn",
|
|
"schema": "public",
|
|
"columns": [
|
|
{
|
|
"__className__": "serverpod.ColumnDefinition",
|
|
"name": "id",
|
|
"fieldName": "id",
|
|
"columnType": 7,
|
|
"isNullable": false,
|
|
"columnDefault": "random_v7",
|
|
"dartType": "UuidValue?"
|
|
},
|
|
{
|
|
"__className__": "serverpod.ColumnDefinition",
|
|
"name": "spaceId",
|
|
"fieldName": "spaceId",
|
|
"columnType": 6,
|
|
"isNullable": true,
|
|
"dartType": "int?"
|
|
},
|
|
{
|
|
"__className__": "serverpod.ColumnDefinition",
|
|
"name": "dataKeyId",
|
|
"fieldName": "dataKeyId",
|
|
"columnType": 0,
|
|
"isNullable": false,
|
|
"dartType": "String"
|
|
},
|
|
{
|
|
"__className__": "serverpod.ColumnDefinition",
|
|
"name": "kind",
|
|
"fieldName": "kind",
|
|
"columnType": 0,
|
|
"isNullable": false,
|
|
"dartType": "String"
|
|
},
|
|
{
|
|
"__className__": "serverpod.ColumnDefinition",
|
|
"name": "studysetId",
|
|
"fieldName": "studysetId",
|
|
"columnType": 7,
|
|
"isNullable": true,
|
|
"dartType": "UuidValue?"
|
|
},
|
|
{
|
|
"__className__": "serverpod.ColumnDefinition",
|
|
"name": "sealedKey",
|
|
"fieldName": "sealedKey",
|
|
"columnType": 5,
|
|
"isNullable": false,
|
|
"dartType": "dart:typed_data:ByteData"
|
|
},
|
|
{
|
|
"__className__": "serverpod.ColumnDefinition",
|
|
"name": "createdAt",
|
|
"fieldName": "createdAt",
|
|
"columnType": 4,
|
|
"isNullable": false,
|
|
"dartType": "DateTime"
|
|
}
|
|
],
|
|
"foreignKeys": [
|
|
{
|
|
"__className__": "serverpod.ForeignKeyDefinition",
|
|
"constraintName": "content_key_fk_0",
|
|
"columns": [
|
|
"spaceId"
|
|
],
|
|
"referenceTable": "offline_sync_spaces",
|
|
"referenceTableSchema": "public",
|
|
"referenceColumns": [
|
|
"id"
|
|
],
|
|
"onUpdate": 3,
|
|
"onDelete": 4
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"__className__": "serverpod.IndexDefinition",
|
|
"indexName": "content_key_space_idx",
|
|
"elements": [
|
|
{
|
|
"__className__": "serverpod.IndexElementDefinition",
|
|
"type": 0,
|
|
"definition": "spaceId"
|
|
}
|
|
],
|
|
"type": "btree",
|
|
"isUnique": false,
|
|
"isPrimary": false
|
|
}
|
|
],
|
|
"managed": true
|
|
}
|
|
},
|
|
{
|
|
"__className__": "serverpod.DatabaseMigrationAction",
|
|
"type": "alterTable",
|
|
"alterTable": {
|
|
"__className__": "serverpod.TableMigration",
|
|
"name": "learning_path_answer",
|
|
"schema": "public",
|
|
"addColumns": [
|
|
{
|
|
"__className__": "serverpod.ColumnDefinition",
|
|
"name": "keyId",
|
|
"fieldName": "keyId",
|
|
"columnType": 0,
|
|
"isNullable": true,
|
|
"dartType": "String?"
|
|
},
|
|
{
|
|
"__className__": "serverpod.ColumnDefinition",
|
|
"name": "nonce",
|
|
"fieldName": "nonce",
|
|
"columnType": 5,
|
|
"isNullable": true,
|
|
"dartType": "dart:typed_data:ByteData?"
|
|
}
|
|
],
|
|
"deleteColumns": [],
|
|
"modifyColumns": [],
|
|
"addIndexes": [],
|
|
"deleteIndexes": [],
|
|
"addForeignKeys": [],
|
|
"deleteForeignKeys": [],
|
|
"warnings": []
|
|
}
|
|
}
|
|
],
|
|
"warnings": [],
|
|
"migrationApiVersion": 1
|
|
} |