jsob migrations
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
import Icon from "../common/Icon.svelte";
|
import Icon from "../common/Icon.svelte";
|
||||||
import Preview from "../files/Preview.svelte";
|
import Preview from "../files/Preview.svelte";
|
||||||
import {getContext} from "svelte";
|
import {getContext} from "svelte";
|
||||||
|
import {uniqBy} from "lodash";
|
||||||
|
|
||||||
const channel = getContext("channel");
|
const channel = getContext("channel");
|
||||||
export let graph;
|
export let graph;
|
||||||
@@ -36,6 +37,7 @@
|
|||||||
}
|
}
|
||||||
if (arecord) {
|
if (arecord) {
|
||||||
carry[schemaField].nodes.push(arecord);
|
carry[schemaField].nodes.push(arecord);
|
||||||
|
carry[schemaField].nodes = uniqBy(carry[schemaField].nodes,"id");
|
||||||
}
|
}
|
||||||
return carry;
|
return carry;
|
||||||
}, {});
|
}, {});
|
||||||
@@ -63,6 +65,7 @@
|
|||||||
});
|
});
|
||||||
if (arecord) {
|
if (arecord) {
|
||||||
carry[schemaField].nodes.push(arecord);
|
carry[schemaField].nodes.push(arecord);
|
||||||
|
carry[schemaField].nodes = uniqBy(carry[schemaField].nodes,"id");
|
||||||
}
|
}
|
||||||
|
|
||||||
return carry;
|
return carry;
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ return new class extends Migration {
|
|||||||
$table->uuid('id')->primary();
|
$table->uuid('id')->primary();
|
||||||
$table->string('schema');
|
$table->string('schema');
|
||||||
$table->string('status');
|
$table->string('status');
|
||||||
$table->json('data');
|
$table->jsonb('data');
|
||||||
$table->json('_sys');
|
$table->jsonb('_sys');
|
||||||
$table->json('_file');
|
$table->jsonb('_file');
|
||||||
|
|
||||||
$table->index(['schema', 'status']);
|
$table->index(['schema', 'status']);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ return new class extends Migration {
|
|||||||
$table->uuid('id')->primary();
|
$table->uuid('id')->primary();
|
||||||
$table->uuid('recordId');
|
$table->uuid('recordId');
|
||||||
$table->string('schema');
|
$table->string('schema');
|
||||||
$table->json('data');
|
$table->jsonb('data');
|
||||||
$table->json('_sys');
|
$table->jsonb('_sys');
|
||||||
$table->json('_file');
|
$table->jsonb('_file');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user