Add permission aware search
This commit is contained in:
1 parent
38c68ca4af
commit
1ee877e630
17 files changed
+608
-4
No files matched your search
@@ -0,0 +1,13 @@
|
||||
export const searchDocumentsSchema = `
|
||||
create virtual table if not exists search_documents using fts5(
|
||||
org_id unindexed,
|
||||
entity_type unindexed,
|
||||
entity_id unindexed,
|
||||
title,
|
||||
body,
|
||||
facet_json unindexed
|
||||
);
|
||||
|
||||
insert into schema_migrations(version, name, applied_at)
|
||||
values (13, 'search_documents', datetime('now'));
|
||||
`;
|
||||
@@ -11,6 +11,7 @@ import { socialGovernanceSchema } from "./migrations/009-social-governance";
|
||||
import { fileHandoffSecuritySchema } from "./migrations/010-file-handoff-security";
|
||||
import { boardInterventionSchema } from "./migrations/011-board-interventions";
|
||||
import { complianceControlsSchema } from "./migrations/012-compliance-controls";
|
||||
import { searchDocumentsSchema } from "./migrations/013-search-documents";
|
||||
|
||||
interface Migration {
|
||||
version: number;
|
||||
@@ -31,6 +32,7 @@ const MIGRATIONS: Migration[] = [
|
||||
{ version: 10, name: "file_handoff_security", sql: fileHandoffSecuritySchema },
|
||||
{ version: 11, name: "board_interventions", sql: boardInterventionSchema },
|
||||
{ version: 12, name: "compliance_controls", sql: complianceControlsSchema },
|
||||
{ version: 13, name: "search_documents", sql: searchDocumentsSchema },
|
||||
];
|
||||
|
||||
const SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1].version;
|
||||
|
||||
Reference in new issue
Block a user