fix: Rebuild foreign key and unique projection from authored facts (#115)
This commit is contained in:
parent
c78af247fe
commit
519a8efca0
1 changed files with 49203 additions and 3053 deletions
123
packages/serverpod_offline_sync_server/migrations/20260902184216091/migration.json
generated
Normal file
123
packages/serverpod_offline_sync_server/migrations/20260902184216091/migration.json
generated
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
{
|
||||
"__className__": "serverpod.DatabaseMigration",
|
||||
"actions": [
|
||||
{
|
||||
"__className__": "serverpod.DatabaseMigrationAction",
|
||||
"type": "deleteTable",
|
||||
"deleteTable": "crdt_schema_columns"
|
||||
},
|
||||
{
|
||||
"__className__": "serverpod.DatabaseMigrationAction",
|
||||
"type": "createTable",
|
||||
"createTable": {
|
||||
"__className__": "serverpod.TableDefinition",
|
||||
"name": "crdt_schema_columns",
|
||||
"dartName": "CrdtSchemaColumn",
|
||||
"module": "serverpod_offline_sync",
|
||||
"schema": "public",
|
||||
"columns": [
|
||||
{
|
||||
"__className__": "serverpod.ColumnDefinition",
|
||||
"name": "id",
|
||||
"fieldName": "id",
|
||||
"columnType": 6,
|
||||
"isNullable": false,
|
||||
"columnDefault": "serial",
|
||||
"dartType": "int?"
|
||||
},
|
||||
{
|
||||
"__className__": "serverpod.ColumnDefinition",
|
||||
"name": "tblId",
|
||||
"fieldName": "tblId",
|
||||
"columnType": 6,
|
||||
"isNullable": false,
|
||||
"dartType": "int"
|
||||
},
|
||||
{
|
||||
"__className__": "serverpod.ColumnDefinition",
|
||||
"name": "name",
|
||||
"fieldName": "name",
|
||||
"columnType": 0,
|
||||
"isNullable": false,
|
||||
"dartType": "String"
|
||||
},
|
||||
{
|
||||
"__className__": "serverpod.ColumnDefinition",
|
||||
"name": "columnType",
|
||||
"fieldName": "columnType",
|
||||
"columnType": 0,
|
||||
"isNullable": false,
|
||||
"dartType": "String"
|
||||
},
|
||||
{
|
||||
"__className__": "serverpod.ColumnDefinition",
|
||||
"name": "dartType",
|
||||
"fieldName": "dartType",
|
||||
"columnType": 0,
|
||||
"isNullable": false,
|
||||
"dartType": "String"
|
||||
},
|
||||
{
|
||||
"__className__": "serverpod.ColumnDefinition",
|
||||
"name": "isNullable",
|
||||
"fieldName": "isNullable",
|
||||
"columnType": 1,
|
||||
"isNullable": false,
|
||||
"dartType": "bool"
|
||||
}
|
||||
],
|
||||
"foreignKeys": [
|
||||
{
|
||||
"__className__": "serverpod.ForeignKeyDefinition",
|
||||
"constraintName": "crdt_schema_columns_fk_0",
|
||||
"columns": [
|
||||
"tblId"
|
||||
],
|
||||
"referenceTable": "crdt_schema_tables",
|
||||
"referenceTableSchema": "public",
|
||||
"referenceColumns": [
|
||||
"id"
|
||||
],
|
||||
"onUpdate": 3,
|
||||
"onDelete": 4
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"__className__": "serverpod.IndexDefinition",
|
||||
"indexName": "crdt_schema_columns_table_column_idx",
|
||||
"elements": [
|
||||
{
|
||||
"__className__": "serverpod.IndexElementDefinition",
|
||||
"type": 0,
|
||||
"definition": "tblId"
|
||||
},
|
||||
{
|
||||
"__className__": "serverpod.IndexElementDefinition",
|
||||
"type": 0,
|
||||
"definition": "name"
|
||||
}
|
||||
],
|
||||
"type": "btree",
|
||||
"isUnique": true,
|
||||
"isPrimary": false
|
||||
}
|
||||
],
|
||||
"managed": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": [
|
||||
{
|
||||
"__className__": "serverpod.DatabaseMigrationWarning",
|
||||
"type": "tableDropped",
|
||||
"message": "One or more columns are added to table \"crdt_schema_columns\" which cannot be added in a table migration. The complete table will be deleted and recreated.",
|
||||
"table": "crdt_schema_columns",
|
||||
"columns": [
|
||||
"columnType"
|
||||
],
|
||||
"destrucive": true
|
||||
}
|
||||
],
|
||||
"migrationApiVersion": 1
|
||||
}
|
||||
Loading…
Reference in a new issue