{ "__className__": "serverpod.DatabaseMigration", "actions": [ { "__className__": "serverpod.DatabaseMigrationAction", "type": "alterTable", "alterTable": { "__className__": "serverpod.TableMigration", "name": "shared_space", "schema": "public", "addColumns": [ { "__className__": "serverpod.ColumnDefinition", "name": "joinToken", "fieldName": "joinToken", "columnType": 0, "isNullable": true, "dartType": "String?" } ], "deleteColumns": [], "modifyColumns": [], "addIndexes": [ { "__className__": "serverpod.IndexDefinition", "indexName": "shared_space_join_token_idx", "elements": [ { "__className__": "serverpod.IndexElementDefinition", "type": 0, "definition": "joinToken" } ], "type": "btree", "isUnique": true, "isPrimary": false } ], "deleteIndexes": [], "addForeignKeys": [], "deleteForeignKeys": [], "warnings": [ { "__className__": "serverpod.DatabaseMigrationWarning", "type": "uniqueIndexCreated", "message": "Unique index \"shared_space_join_token_idx\" is added to table \"shared_space\". If there are existing rows with duplicate values, this migration will fail.", "table": "shared_space", "columns": [ "joinToken" ], "destrucive": false } ] } }, { "__className__": "serverpod.DatabaseMigrationAction", "type": "createTable", "createTable": { "__className__": "serverpod.TableDefinition", "name": "shared_space_email_invitation", "dartName": "SharedSpaceEmailInvitation", "module": "halkyon_base", "schema": "public", "columns": [ { "__className__": "serverpod.ColumnDefinition", "name": "id", "fieldName": "id", "columnType": 7, "isNullable": false, "columnDefault": "random_v7", "dartType": "UuidValue?" }, { "__className__": "serverpod.ColumnDefinition", "name": "sharedSpaceId", "fieldName": "sharedSpaceId", "columnType": 7, "isNullable": false, "dartType": "UuidValue" }, { "__className__": "serverpod.ColumnDefinition", "name": "addressHash", "fieldName": "addressHash", "columnType": 0, "isNullable": false, "dartType": "String" }, { "__className__": "serverpod.ColumnDefinition", "name": "tokenHash", "fieldName": "tokenHash", "columnType": 0, "isNullable": false, "dartType": "String" }, { "__className__": "serverpod.ColumnDefinition", "name": "role", "fieldName": "role", "columnType": 0, "isNullable": false, "dartType": "protocol:SharedSpaceRole" }, { "__className__": "serverpod.ColumnDefinition", "name": "invitedBy", "fieldName": "invitedBy", "columnType": 7, "isNullable": false, "dartType": "UuidValue" }, { "__className__": "serverpod.ColumnDefinition", "name": "invitedAt", "fieldName": "invitedAt", "columnType": 4, "isNullable": false, "dartType": "DateTime" } ], "foreignKeys": [ { "__className__": "serverpod.ForeignKeyDefinition", "constraintName": "shared_space_email_invitation_fk_0", "columns": [ "sharedSpaceId" ], "referenceTable": "shared_space", "referenceTableSchema": "public", "referenceColumns": [ "id" ], "onUpdate": 3, "onDelete": 4 } ], "indexes": [ { "__className__": "serverpod.IndexDefinition", "indexName": "shared_space_email_invitation_address_idx", "elements": [ { "__className__": "serverpod.IndexElementDefinition", "type": 0, "definition": "sharedSpaceId" }, { "__className__": "serverpod.IndexElementDefinition", "type": 0, "definition": "addressHash" } ], "type": "btree", "isUnique": true, "isPrimary": false }, { "__className__": "serverpod.IndexDefinition", "indexName": "shared_space_email_invitation_token_idx", "elements": [ { "__className__": "serverpod.IndexElementDefinition", "type": 0, "definition": "tokenHash" } ], "type": "btree", "isUnique": true, "isPrimary": false } ], "managed": true } }, { "__className__": "serverpod.DatabaseMigrationAction", "type": "alterTable", "alterTable": { "__className__": "serverpod.TableMigration", "name": "shared_space_member", "schema": "public", "addColumns": [ { "__className__": "serverpod.ColumnDefinition", "name": "addedBy", "fieldName": "addedBy", "columnType": 7, "isNullable": true, "dartType": "UuidValue?" }, { "__className__": "serverpod.ColumnDefinition", "name": "isNew", "fieldName": "isNew", "columnType": 1, "isNullable": false, "columnDefault": "false", "dartType": "bool" } ], "deleteColumns": [], "modifyColumns": [], "addIndexes": [], "deleteIndexes": [], "addForeignKeys": [], "deleteForeignKeys": [], "warnings": [] } } ], "warnings": [ { "__className__": "serverpod.DatabaseMigrationWarning", "type": "uniqueIndexCreated", "message": "Unique index \"shared_space_join_token_idx\" is added to table \"shared_space\". If there are existing rows with duplicate values, this migration will fail.", "table": "shared_space", "columns": [ "joinToken" ], "destrucive": false } ], "migrationApiVersion": 1 }